Jump to content

Czar

Members
  • Content Count

    445
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Czar

  1. I believe that your suggested method

     

      var MyEditBox := TW3EditBox.Create(self);
      MyEditBox.SetBounds(50,50,300,40);
      MyEditBox.handle.setAttribute('list','mycities');
    
      var mydatalist := w3_createHtmlElement('DATALIST');
      mydatalist.handle := MyEditBox.handle.parentNode.appendChild(mydatalist);
      mydatalist.handle.setAttribute('id','mycities');
    
      mydatalist.innerHTML := #'
      <option value="Amsterdam">
      <option value="Paris">
      <option value="Canberra">
      <option value="etc..">';

    Is most suitable for the app. The only drawback is that with 266 suburbs the list becomes very very long.

    Sorry to be a pain but how do I set the dropdown list to limit itself to say 10 items? 

    I am finding it difficult to figure out how to take javascript solutions and apply them to SMS. Might be a good tutorial for thoise of us not that familiar with javascript etc

     

     

  2. I have a situation where I want to use predictive text. Parents typing in the school, I would like to have the predict school appear.

    I have sense that this is "autocomplete" but I don't understand how I link a resource to this ability.

    I have a simple array of school names. Is it possible to link the array to autocomplete?

     

    if so an example would be awesome as I cannot find anything suitable in the projects.

     

     

  3. I have a form with edit boxes, labels on a multiple of panels etc. e.,g a parent panel and a student panel. The page of panels is longer than a screen length and all panels sit on a scrollbox.

    The user tabs through the edit boxes and at some point reaches the last one on the current panel. If the user then presses tab while in the final editbox the focus goes elsewhere, but not clear where. It doesn't go to the next edit box on the following panel.

     

    It seems that other components also receive focus. It is very confusing for the user.

     

    What I am wondering is it possible to have a tabstop property that allows the developer to set which components do and don't receive focus when using tab.

     

    Otherwise are there other solutions to the problem?

     

  4. I have noticed that when using the mousewheel the contents are always scrolled to the size of the scroll box client height - in other words it is basically like a snap to page result.

     

    I would like to only scroll a small distance but I cannot find a good way to do it.

     

    I can change the code in smartcl.scroll - but obviously not a good long term solution :)

     

    procedure TW3ScrollController.HandleMouseWheel(Sender: TObject;
      Shift: TShiftState; WheelDelta: integer;
      const MousePos: TPoint; var Handled: boolean);
    begin
      if FDirection in [mdVertical,mdAll] then
      begin
        var dy := FContentTop + (Sign(WheelDelta) * 100);//FScrollControl.ClientHeight);
        MomentumScrollTo(FContentLeft, dy);
        Handled := true;
      end;
    end;

    Any suggestions for setting the value of FScrollControl.ClientHeight to smaller than the actual component height? 

  5. I think I managed to copy paste incorrect one

    :D 

     

    I tried this - compiles and run but doesn't show the build number of the app. I tried self and application.

     

    procedure TForm1.W3Button1Click(Sender: TObject);
    var ver: TW3ApplicationVersionInfo;
        MyApp : TW3ApplicationInfo;
    begin
    
      MyApp := TW3ApplicationInfo.create(self);
    
    
      ver:= TW3ApplicationVersionInfo.create(MyApp);
      ShowMessage(inttostr(ver.build));
    end;

     

×
×
  • Create New...