Jump to content

dkeene

uniGUI Subscriber
  • Posts

    211
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by dkeene

  1. Hello

    I need a strategy or maybe I am doing something wrong. I have a dropdown and user types a few key letters in the edit part of the dropdown, and after a CheckChangeDelay of 4000 (for example), I have a function call within thecombobox.OnChange to return a result set based on the edit box which works well, and then dropdown the combobox for user to select from the results.

    Problem is that although I clear the combobox items, they are still in the dropdown list and the dropdown does not reflect the changes that I made.

    procedure TfmTableEdit.UniComboBoxChange(Sender: TObject);
    var
       MySQL: String;
       
    begin
        
       MySQL:=// example "select name from table where name like '%keyword%' limit 7"
    
       //Clear ComboBox Items.
       TUniDBCombobox(Sender).Items.Clear;
       TUniDBCombobox(Sender).Refresh;
       
       uniMainModule.MPopulateviaSQL(MySQL, TUniComboBox(Sender), 100);  //populates this dbcombobox.items with result set from MySQL.
    
       //force dropdown to open
       (Sender as TUniDBComboBox).JSInterface.JSCallDefer('expand', [], 200);
       
    end;

    Any thoughts?
    Thanks

    Doug

  2. Here is example on simple form.

     

    procedure TForm1.ComboBox1Change(Sender: TObject);
    var
       i: integer;
    begin
       for i := 0 to 3 do
       begin
          ComboBox1.Items.Add(IntToStr(random(200))) ;

       end;
    end;

    procedure TForm1.FormCreate(Sender: TObject);

    begin
       ComboBox1.AutoDropDown:=True;
    end;

     

    The point of this demo is: combobox is closed. On typing something, the dropdown  list changes but automatically pops down. That is all that i want -- the autoDropDown.

  3. my question is not how to populate the listbox, but looking for the functionality such as:

    Delphi ComboBox.Autodropdown:

             

    When AutoDropDown is true, the combo box automatically drops down its list when the user starts typing a string while the combo box has focus. 

    When AutoDropDown is false, the user must explicitly use the drop-down button to drop down the combo box list. 

     

    How can I achieve this functionality with UniComboBox?

     

  4. It seems that if user is typing in the edit part of the combobox, and the list box is not showing, UniComboBox1.Expand does not drop down the listbox. 

    In the images, user enters the blank combobox which has no Items in the dropdown. (snap123.png)

    user types asp (snap124.png)

    program queries medication database: select medication from medication_table where medication like "%asp%" -- this returns some result set.

    i want the dropdown to OPEN with this list without user to have to click the dropdown button. as it appears in (snap129.png)

    snap123.png

    snap124.png

    snap129.png

  5. I wish to make the combobox dropdown OPEN without asking the user to click the traditional button. So, when user types a few letters in the edit box, i query a database to populate the combobox items. then I want the combobox to OPEN to present user's choices. So i need a way to OPEN the combobox programatically

  6. Hi

    Is there a way to PROGRAMMATICALLY make a unicombobox to dropdown? I am trying to decrease the number of necessary actions for use to select something based on the value of the edit box.

    I tried this in the OnChange method:

    procedure TfmTableEdit.UniComboBoxChange(Sender: TObject);
    var
       MySQL: String;
       MyTest: String;
    begin
      //
       //Populate the combo dropdown

       //drop down the combo listbox
       UniSession.AddJS(TUniDBComboBox(Sender).JSName + '.expand();');   //***************here
       
    end;

    This approach doesn't seem to work. any suggestions?

    Thank you

    Doug

  7. Hi, All

    I am trying to add icons (images) to NativeImageList and don't seem to be getting this right.

    I added new IconCIs and set to "search" for example, but the image doesn't seem to populate.

    Any Thoughts?
    Thank you

    Dougsnap121.thumb.png.e95ce5c5807ffc997a3c1921c661e591.png

  8. I set the style in the properties editor, run the program, type in some text in the control during run time.

    I then click a TUniSpeedButton to process the text so even when I see the text on the screen,

    procedure TToolPaletteForm.UniSpeedButton4Click(Sender: TObject);
    begin
       Self.UniLabel11.Caption:=Self.UniComboBox1.Text;  **The text value is read as ''

    end;

     

  9. Hello All

    I am trying to use a UniDBCombobox or UniCombox. I set the style to Simple, and when I try to read the UniCombox1.Text i get empty string despite it being something.

    Any thoughts?

    Doug

  10. Thank you, Sherzod for the reference. 

    Are you saying to copy the following text into the form's "SCRIPT" property in the object inspector:

    var IDLE_TIMEOUT = 60; //seconds
    var _idleSecondsCounter = 0;
    document.onclick = function() {
        _idleSecondsCounter = 0;
    };
    document.onmousemove = function() {
        _idleSecondsCounter = 0;
    };
    document.onkeypress = function() {
        _idleSecondsCounter = 0;
    };
    window.setInterval(CheckIdleTime, 1000);

    function CheckIdleTime() {
        _idleSecondsCounter++;
        var oPanel = document.getElementById("SecondsUntilExpire");
        if (oPanel)
            oPanel.innerHTML = (IDLE_TIMEOUT - _idleSecondsCounter) + "";
        if (_idleSecondsCounter >= IDLE_TIMEOUT) {
            //alert("Time expired!");
            //document.location.href = "logout.html";
            ajaxRequest(MainForm.form, '_idle_timeout', []);
        }
    }

     

    and then copy the following into the form's OnAjaxEvent:

     

      if EventName = '_idle_timeout' then
      begin
        // your logic
        ShowMessage('idle_timeout');
      end;

     

    this is what I tried but no result.

  11. Hello

    Is there any way to make the application WARN the user when a timeout will occur? For example, using online banking, no matter what form I am on, if I leave the session unattended it will pop-up a warning and indicate X minutes to forced log off unless you wish to continue, and if not, will close the session and revert to login screen? This would protect your banking information and privacy and prevent user from leaving the system unattended.

    Thank you! Any example would be helpful

    Doug

     

  12. Thank you cbr, this is still not working for me. I am not sure how to "register" the 64 bit libmysql.dll, I tried regsvr32 but that did not work.

    In a new windows machine I install MySql 8. This seems to set up a folder

    C:\Program Files\MySQL\MySQL Server 8.0\lib with a file libmysql.dll which i copy into the directory of my application.

    I use the Release switch, so my executable is in:

    c:\MyApplication\Win64\Release, where the libmysql.dll, about 6.4 megabyes, is clearly copied.

    The new machine does not have Delphi (XE8) installed, so I don't know what changes were made that enables the program to work on the development machine vs. this new machine.

    I installed UniGUI hyperserver on the new machine.

    I click the executable in c:\MyApplication\Win64\Release and I get the error: 

    An Exception has occured in application:

    [FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll or libmysqld.dll]. The specified module could not be found. Hint: check it is in the PATH or application EXE directories, and has x64 bitness.!

    Restart application

    Have you or anyone set up a new machine and could outline the steps to get this to work?

    Thank you

    Doug

  13. I also tried the library location from the actual installation

     

       MyString:='C:\Program Files\MySQL\MySQL Server 8.0\lib\'+'libmysql.dll';
     

    no matter where I put the libmysqll.dll it can't find it or load it

  14. Thank you erich and cbr. I don't get how difficult this can be.

    On TUniServerModule.UniGUIServerModuleCreate(...

    begin

       MyString:='C:\MyUniApplicationS\libmysql.dll';
       Self.FDPhysMySQLDriverLink1.VendorLib:=MyString;

    end;

     

    yet despite the libmysql.dll being at this location, I get the error: can not load vendor library... any other ideas? I am running in Release Mode.

  15. Howdy

    I have been using unigui and MySQL nicely for development in 64 bit mode. I am now trying to create a server machine for deployment. I have nicely installed 64bit mysql on the target server along with unigui hyperserver, but so far, i can't get past this error:

    [FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll or libmysqld.dll]. The specified module could not be found. Hint: check it is in the PATH or application EXE directories, and has x64 bitness.!

    is anyone familiar with exactly where to place the libmysql.dll ?

    Thank you

    Doug

  16. Hello

    I have created a UniPageControl with Tabsheets, for example, A, B, C, D, E. 

    I try to change the tab order, for example, to B, A, C, D, E, by assigning TabSheetB.PageIndex:=0 and TabSheetA.PageIndex:=1.

    This does not seem to work, and debugging shows that the PageIndex will only change in the design mode or loading mode.

    Does anyone know the way to change the order of a tabsheet in a Pagecontrol during runtime???
    Thank you

    Doug

×
×
  • Create New...