picyka Posted June 6, 2020 Share Posted June 6, 2020 In the TUniDBComboBox component how do I give an F4 and fire an item from the Triggers this is preferably on the client side. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2020 Share Posted June 6, 2020 39 minutes ago, picyka said: In the TUniDBComboBox component how do I give an F4 and fire an item from the Triggers this is preferably on the client side. Do you want like this? For example for UniComboBox1: procedure TMainForm.UniComboBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_F4 then UniComboBox1.Expand; //(Sender as TUniComboBox) end; Quote Link to comment Share on other sites More sharing options...
picyka Posted June 6, 2020 Author Share Posted June 6, 2020 9 minutes ago, Sherzod said: Do you want like this? For example for UniComboBox1: procedure TMainForm.UniComboBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_F4 then UniComboBox1.Expand; //(Sender as TUniComboBox) end; procedure TUniDBComboBoxObject._TriggerEvent (Sender: TUniCustomComboBox; AButtonId: Integer); start if AButtonId = 0 then Self.ExecuteSearch; if Assigned (Self.FOldTriggerEvent), then Self.FOldTriggerEvent (Sender, AButtonId); end; OnTriggerEvent := Self._TriggerEvent; I wanted to call a client-side trigger event with JS using F4 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 6, 2020 Author Share Posted June 6, 2020 UniDBComboBoxObject.pas Quote Link to comment Share on other sites More sharing options...
picyka Posted June 6, 2020 Author Share Posted June 6, 2020 This would be for a custom component. Quote Link to comment Share on other sites More sharing options...
picyka Posted June 6, 2020 Author Share Posted June 6, 2020 procedure TUniDBComboBoxObject._KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (key = VK_F4) and (Self.Triggers.Count > 0) then Self.OnTriggerEvent(Self,0); end; 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.