Dimitri Posted November 22, 2019 Share Posted November 22, 2019 Hi, I use the function keys (F3 for example) to open modal form with the OnKeyDown event of a grid. After closing this modal form I focus the grid to get back. UniSession.AddJS (FDbGrid.JSName + '. Focus ();'); Then F3 key no longer opens a modal form but opens my browser search. How to correctly force the focus on a TUniGrid component? Thank you UniGUI: 1.50.0.1484 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 23, 2019 Share Posted November 23, 2019 20 hours ago, Dimitri said: UniGUI: 1.50.0.1484 Hello, Which edition of UniGUI are you using? http://unigui.com/explore/matrix/#featurem Quote Link to comment Share on other sites More sharing options...
Dimitri Posted November 25, 2019 Author Share Posted November 25, 2019 Hello, I'm using a Professional Edition. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 25, 2019 Share Posted November 25, 2019 31 minutes ago, Dimitri said: I'm using a Professional Edition. Hello, Please adjust your forum email address: Quote Link to comment Share on other sites More sharing options...
Dimitri Posted November 25, 2019 Author Share Posted November 25, 2019 It's done ! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 25, 2019 Share Posted November 25, 2019 Just now, Dimitri said: It's done ! Thank you for the update. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 25, 2019 Share Posted November 25, 2019 On 11/22/2019 at 9:55 PM, Dimitri said: Then F3 key no longer opens a modal form but opens my browser search. Have you seen this demo?: \FMSoft\Framework\uniGUI\Demos\Desktop\MonitoredKeys Quote Link to comment Share on other sites More sharing options...
Dimitri Posted November 26, 2019 Author Share Posted November 26, 2019 Yes I have. I can see two differences with my project. I'm using the KeyDown grid event, not the form one. And the MonitoredKeys.KeyHandleAll set to False. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2019 Share Posted November 26, 2019 38 minutes ago, Dimitri said: Yes I have. I can see two differences with my project. I'm using the KeyDown grid event, not the form one. And the MonitoredKeys.KeyHandleAll set to False. MainForm.KeyPreview = True ? Quote Link to comment Share on other sites More sharing options...
Dimitri Posted November 26, 2019 Author Share Posted November 26, 2019 There is a form in the main form. On the active form with the grid, yes it's set to true. On the main form who contains the previous one, it's set to false. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2019 Share Posted November 26, 2019 On 11/22/2019 at 9:55 PM, Dimitri said: Then F3 key no longer opens a modal form but opens my browser search. Can you make a simple testcase for reproduce? Quote Link to comment Share on other sites More sharing options...
Dimitri Posted November 28, 2019 Author Share Posted November 28, 2019 Here it is. However, the problem seems to be always present in the testcase, but intermittent in my project. DemoFunctionKeys.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 28, 2019 Share Posted November 28, 2019 2 minutes ago, Dimitri said: Here it is. However, the problem seems to be always present in the testcase, but intermittent in my project. I will check. Thanks Quote Link to comment Share on other sites More sharing options...
Dimitri Posted December 2, 2019 Author Share Posted December 2, 2019 Hi Sherzod. Did you find something ? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2019 Share Posted December 2, 2019 11 minutes ago, Dimitri said: Did you find something ? Thanks. Hi, It seems to me that you are not using the MonitoredKeys property of SingleForm. On 11/25/2019 at 7:23 PM, Sherzod said: \FMSoft\Framework\uniGUI\Demos\Desktop\MonitoredKeys Quote Link to comment Share on other sites More sharing options...
Dimitri Posted December 3, 2019 Author Share Posted December 3, 2019 Yes I already watched it. If I configure the testcase as the MonitoredKey sample it still doesn't work. You can find attached a second version of the testcase. Thanks. DemoFunctionKeys.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 3, 2019 Share Posted December 3, 2019 24 minutes ago, Dimitri said: Yes I already watched it. If I configure the testcase as the MonitoredKey sample it still doesn't work. You can find attached a second version of the testcase. Thanks. Ok, I will check it. Quote Link to comment Share on other sites More sharing options...
Dimitri Posted December 10, 2019 Author Share Posted December 10, 2019 Hi Sherzod. Did you check it ? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 On 12/10/2019 at 1:17 PM, Dimitri said: Did you check it ? Thanks. Hi, Sorry for the late response. It seems you still do not add Keys to MonitoredKeys. I am analyzing your test case at the moment. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 On 12/10/2019 at 1:17 PM, Dimitri said: Did you check it ? Thanks. For example. SingleForm: MonitoredKeys.Keys Quote Link to comment Share on other sites More sharing options...
Dimitri Posted December 11, 2019 Author Share Posted December 11, 2019 Ah Thanks. Is it necessary to add Keys to all Forms with MDI Forms ? 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.