Jump to content

Czar

Members
  • Content Count

    445
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Czar

  1. I am trying to implement a "i am not a robot" into my website

     

    Basic HTML/JS looks like the following with a second step required to validate it server side.

    <script src="https://www.google.com/recaptcha/api.js"></script>

    HTML:

    <div class="g-recaptcha" data-sitekey="YOUR_KEY" data-callback="correctCaptcha"></div>

    JS:

    var correctCaptcha = function(response) {
            alert(response);
        };

    I thought I could manage getting it to wok in SMS but I got very lost. I couldn't find examples that seemed to be a parallel challenge.

    It would be great to have some clear tutorial or case study to show how it is possible to integrate JS

     

    and or it would be good to a have google recaptcha component :)

     

     

    info link: https://stackoverflow.com/questions/27902539/how-can-i-validate-google-recaptcha-v2-using-javascript-jquery

    https://developers.google.com/recaptcha/intro

  2. If it was possible to not break existing code then I would not be against it. I don't convert much delphi code so I don't see it as important from that point of view. It might make it more delphi friendly perhaps, making transition easier for people.

     

    I think what catches out more delphi users is that expected properties of components aren't there, something as simple as changing the form colour is not obvious. The paradigm shift is quite steep if you aren't used to working with CSS and HTML etc (which I am not) so it takes a little bit of adjustment.

  3. Hi, I might be missing the point - I click on tailwind one and see "oh" in a dialog. I click on tailwind 2 and nothing happens, no visual change.

     

    checked firefox and chrome

  4. I too would love to see a roadmap plan for the next 12 months. The efforts have been going into special projects that not many people will probably have a use for and the bread-and-butter has been left at a usable but not great state. For example, the IDE could do with love. The fact that the visual components don't surface basics like font size/colour etc and requires work arounds and non-intuitive knowledge suggests low hanging fruit for improvements. The ide has lots of bugs and irritating issues. for example events on buttons will often be reoved or doubled up. e.g., OnSubmitClick for button can be set once but if double click on it again often it breaks.

    Would the team consider open sourcing the IDE? Or maybe looking at a completly different model. I am invested in using SMS but I did so in the hope of meaningful improvements. Jarto I believe you are only active owner and I really appreciate your efforts but you are one person and this project could be so much more with greater input from more people.

     

  5. Hi @jarto,  I have tried all the permutations, autosize on/off and wordwrap on/off and the label doesn't behave nicely.

     

    With a label and Tlayout, I would have thought that the layout determines the width of the label and the label's content would determine the height if wordwrap is true.

     

    As a normal label (not using tlayout), if autosize is false and Wordwrap:=true then the the height of the label should increase within the provided width so that the content fits.

     

     

     

     

  6. @warleyalex thanks for the project. 

    I tried it on my own project and it didn't work as expected. I figure dout that if the caption is set in onactivate then the resize does not change the height of the label correctly.

    procedure TForm1.Form1Activate(Sender: TObject);
    begin
    
      Label1.Caption := '<b>Today''s date '+FormatDateTime('dddd d of mmmm yyyy', now)
      +'</b><br>Here are your upcoming booked sessions. Please select the sessions your children will be absent for:<br>MOre writing.';
    
      Label2.Caption := Label1.Caption;
    end;

    Then you end up with the image attached

     

    So there are two issues -

    1,  tw3label and the clipping 

    2  How do we get the label height to be recalculated if caption set in "activate", or even within the "resize" procedure.

     

     

     

    projTeste.zip

    2019-04-09_07-38-47.png

  7. I am having a number of issues with w3labels and correct wrapping of text.

    1. When using a layout wordwrap is not obeyed- text disappears off to the side.
    2. Wordwrap does work correctly in a normal non-layout formatted label - chopping off text top and bottom

    Changing wordwrap and autosize properties does not solve the issues.

     

    You can see in the picture the layout version along the top (above the button) and a normal label not in the layout below the button.

    In the top label the sentence is cut off at ... the sessions your children will be absent for:" (in italics is missing).

    In the bottom label the wordwrap does not result in sufficient height.

     

    ----

    No custom css or non-standard settings just opened a new Visual Component Project

    internal browser set to limited width - e.g., (480x800)

     


     

     

     

    SmartMS_2019-04-08_09-33-24.png

    labelissue.zip

  8. Thanks that worked ok - except it would offset the form when the form was reactivated.

     

    So instead I used the following in resize and that seems to work in my project which has 3 forms.

     

    procedure CentreForm(f : TW3Form);
    const scrwdth = 600;
    begin
      if f.ClientWidth> scrwdth then
      begin
        var p := (f.ClientWidth - scrwdth) div 2;
        p := round((p / scrwdth) * 100);
    
        f.Handle.style['max-width'] := inttostr(scrwdth)+'px';
        f.Handle.style['left'] := '50%';
        f.Handle.style['transform'] := 'translateX('+inttostr(p)+'%)';
      end;
    end;

     

  9. I am using a Tlayout to layout my UI. However, if the browser is on a very wide screen it stretches out to the width of the screen.

     

    I see two easy options. Restrict the width of the whole page (preferred) But I couldn't get that to work, I tried

    the following in the template

    <style>
    .content {
      max-width: 100px;
      margin: auto;
    }
      <body><?pas=Compiler.LinkedScriptTag?><div class="content">
      <!-- Page content -->
    </div></body>

    The other easy option would be to set a maxwidth for the layout - but I couldn't get that to work either. I tried setting a width, and padding. Width seemed to be ignored and padding made some of the components (client type) format in weird ways.

    So, how can I restrict the max width of the app? Or, how I can set a max width on the tlayout?

     

  10. Yes I am hoping that a more robust and intuitive solution is made available.

    I have it sorted for my current project but it took quite a while to get it right, much much longer than it should have.

     

×
×
  • Create New...