picyka Posted November 7, 2022 Share Posted November 7, 2022 Would you like to add an option to select all, or deselect all. Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 8, 2022 Share Posted November 8, 2022 13 hours ago, picyka said: Would you like to add an option to select all, or deselect all. Thanks Hello, With code or action !? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 8, 2022 Share Posted November 8, 2022 One possible solution I think, using triggers: procedure TMainForm.UniCheckComboBox1TriggerEvent(Sender: TUniCustomComboBox; AButtonId: Integer); var I: Integer; begin if AButtonId = 0 then begin for I := 0 to (Sender as TUniCheckComboBox).Items.Count-1 do (Sender as TUniCheckComboBox).Selected[I] := True; (Sender as TUniCheckComboBox).JSInterface.JSCall('fireEvent', ['select', (Sender as TUniCheckComboBox).JSControl]); end else if AButtonId = 1 then begin (Sender as TUniCheckComboBox).ClearSelection; end; end; Quote Link to comment Share on other sites More sharing options...
picyka Posted November 8, 2022 Author Share Posted November 8, 2022 4 horas atrás, Sherzod disse: Uma solução possível eu acho, usando gatilhos: procedure TMainForm.UniCheckComboBox1TriggerEvent(Sender: TUniCustomComboBox; AButtonId: Integer); var I: Integer; begin if AButtonId = 0 then begin for I := 0 to (Sender as TUniCheckComboBox).Items.Count-1 do (Sender as TUniCheckComboBox).Selected[I] := True; (Sender as TUniCheckComboBox).JSInterface.JSCall('fireEvent', ['select', (Sender as TUniCheckComboBox).JSControl]); end else if AButtonId = 1 then begin (Sender as TUniCheckComboBox).ClearSelection; end; end; Thank you, I will check 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.