Luciano França Posted June 14, 2023 Share Posted June 14, 2023 This is some bug because there is the event but it doesn't work. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 14, 2023 Share Posted June 14, 2023 Build of uniGUI? Explain in more detail. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 14, 2023 Author Share Posted June 14, 2023 Version 1.90.0.1568 I just need to use the onkeydown event of the "UniDBTreeGrid" component in the "UniBDgrid" component I can use normally I tried to adapt a script you sent me about the same problem with Listbox but I couldn't http://forums.unigui.com/index.php?/topic/23515-key-13-doesnt-work-with-listbox -bug-unigui/#comment-133601 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 15, 2023 Share Posted June 15, 2023 16 minutes ago, Luciano França said: I just need to use the onkeydown event of the "UniDBTreeGrid" component in the "UniBDgrid" component I can use normally Can you make a simple testcase? Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 15, 2023 Author Share Posted June 15, 2023 14 minutes ago, Sherzod said: Can you make a simple testcase? function MainForm: TMainForm; begin Result := TMainForm(UniMainModule.GetFormInstance(TMainForm)); end; procedure TMainForm.UniDBTreeGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key = 13 then // Does not work Showmessage('KeyDown'); { In my application, when the customer enters the Grid, I perform several actions, such as Opening the change of a Chart of Accounts register. } end; procedure TMainForm.UniDBTreeGrid1KeyPress(Sender: TObject; var Key: Char); begin if key = #13 then // Does not work Showmessage('KeyPress'); { In my application, when the customer enters the Grid, I perform several actions, such as Opening the change of a Chart of Accounts register. } end; initialization RegisterAppFormClass(TMainForm); end. Unigui OnKeyDown TreedbGrid.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 15, 2023 Share Posted June 15, 2023 1 hour ago, Luciano França said: I tried to adapt a script you sent me about the same problem with Listbox but I couldn't Try this: function afterrender(sender, eOpts) { sender.getView().addListener('itemkeydown', function(cmp, record, item, index, e, eOpts) { ajaxRequest(sender, 'keydown', { key: e.keyCode }) }); } Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 15, 2023 Author Share Posted June 15, 2023 9 hours ago, Sherzod said: Try this: function afterrender(sender, eOpts) { sender.getView().addListener('itemkeydown', function(cmp, record, item, index, e, eOpts) { ajaxRequest(sender, 'keydown', { key: e.keyCode }) }); } Thank you very much 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.