Jump to content

dkeene

uniGUI Subscriber
  • Posts

    211
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by dkeene

  1. Hello I am trying to use RemoteQuery on a DBComboBox to build a query based on the value of the DBComboBox's textbox as a user types some keys. Instead of using the event: DBComboBox.OnChange(Sender: TObject) to process the request, i will set property RemoteQuery to True, and will now use uniDBComboBoxRemoteQuery(const QueryString: string; Result: TStrings); to grab the value of QueryString and build an SQL statement. However, unlike OnChange(Sender: TObject), now I don't have any knowledge of which control is triggering this event. Is there any way of grabbing the sender of this event and why is it not included in as something like DBComboBoRemoteQuery(Sender: TObject; const QueryString: string; Result: TStrings); Please help Thanks Doug
  2. Thank you Hayri I am trying to make this work.
  3. do you have a demo of this ? i am interested but i don't have the telegram app to message you. Thanks
  4. 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
  5. 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.
  6. my question is not how to populate the listbox, but looking for the functionality such as: Delphi ComboBox.Autodropdown: Description 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?
  7. 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)
  8. 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
  9. 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
  10. Hello I am trying to create triggers at runtime for DBCombobox. DBComboBox1.Triggers.Create(Self but what is the other paramter? does anyone have any experience with this? thanks Doug
  11. dkeene

    NativeImageList

    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 Doug
  12. dkeene

    ComboBox Style

    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;
  13. dkeene

    ComboBox Style

    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
  14. dkeene

    UniCheckBoxCombo

    That would be nice! Is it your own component of via uniGUI? Do you have other components?
  15. Hi, All I think unicheckboxcombo is a nice component. Is there any way to use this with a database? Doug
  16. dkeene

    Timeout Warning

    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.
  17. dkeene

    Timeout Warning

    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
  18. dkeene

    MySQL and unigui

    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
  19. dkeene

    MySQL and unigui

    i can't even get this to work on the original machine
  20. dkeene

    MySQL and unigui

    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
  21. dkeene

    MySQL and unigui

    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.
  22. 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
  23. Thank you, Sherzod, this worked fine. Is the control supposed to work by setting the PageIndex?
  24. 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...