Mossy Posted August 3, 2023 Share Posted August 3, 2023 I have Unigui app and the users complain that the keystrokes are slow at times. I am not using client side code. Is this the reason and how can I handle key press on client side and send ajax request to server if certain keys are pressed? regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2023 Share Posted August 3, 2023 Hello, 23 minutes ago, Mossy said: I am not using client side code. Is this the reason and how can I handle key press on client side and send ajax request to server if certain keys are pressed? For example: \FMSoft\Framework\uniGUI\Demos\Desktop\MonitoredKeys Quote Link to comment Share on other sites More sharing options...
Mossy Posted August 3, 2023 Author Share Posted August 3, 2023 Thank you SHERZOD I am using the same method, are the keystrokes not handled in server side using this method. I found at times there is a delay between pressing a key and key appearing on screen. Is there a way of handling the keyboard activity on the client side and only if an action required to send request to server. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2023 Share Posted August 3, 2023 7 minutes ago, Mossy said: Is there a way of handling the keyboard activity on the client side and only if an action required to send request to server. Can you clarify exactly which key combinations for example? Quote Link to comment Share on other sites More sharing options...
Mossy Posted August 3, 2023 Author Share Posted August 3, 2023 What I like to do is to allow the user type few characters and then for example when they typed 4 characters or more do a database search. Currently users type fast and the edit box is left behind since they are typing faster than the screen gets updated. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2023 Share Posted August 3, 2023 16 minutes ago, Mossy said: What I like to do is to allow the user type few characters and then for example when they typed 4 characters or more do a database search. Currently users type fast and the edit box is left behind since they are typing faster than the screen gets updated. And what do you want !? Give the sequence of actions that you would like to apply. Quote Link to comment Share on other sites More sharing options...
Mossy Posted August 3, 2023 Author Share Posted August 3, 2023 I would like in a TuniEdit box when for example 4 characters typed to send an ajax request to the server and return a response, the response need to be shown to the user so they can select one of the choices. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2023 Share Posted August 3, 2023 1 hour ago, Mossy said: I would like in a TuniEdit box when for example 4 characters typed to send an ajax request to the server and return a response, the response need to be shown to the user so they can select one of the choices. Why don't you use UniComboBox with RemoteQuery? Quote Link to comment Share on other sites More sharing options...
Mossy Posted August 4, 2023 Author Share Posted August 4, 2023 Is there an example of how to use RemoteQuery ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 4, 2023 Share Posted August 4, 2023 8 minutes ago, Mossy said: Is there an example of how to use RemoteQuery ? \FMSoft\Framework\uniGUI\Demos\Desktop\ComboBox Remote Data \FMSoft\Framework\uniGUI\Demos\Desktop\DBLookupComboBox - Custom Remote Query \FMSoft\Framework\uniGUI\Demos\Desktop\DBLookupComboBox - Custom Remote Query (CDS) Quote Link to comment Share on other sites More sharing options...
Mossy Posted August 4, 2023 Author Share Posted August 4, 2023 thank you Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted August 4, 2023 Share Posted August 4, 2023 On 8/3/2023 at 2:32 PM, Mossy said: I would like in a TuniEdit box when for example 4 characters typed to send an ajax request to the server and return a response, the response need to be shown to the user so they can select one of the choices. Hello Mossy, TUniedit has a property, delay time, on each Keystoke, before the event is gone (wich is by default 250 ms) if i remember. Try to increase this property. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 4, 2023 Share Posted August 4, 2023 39 minutes ago, Abaksoft said: TUniedit has a property, delay time, on each Keystoke, before the event is gone (wich is by default 250 ms) if i remember. Yes, \FMSoft\Framework\uniGUI\Demos\Desktop\Delayed Search But I don't think this is his case. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.