picyka Posted December 2, 2020 Share Posted December 2, 2020 Good morning, how to change Campo.Triggers [0].ImageIndex: = 1; Campo.Triggers [0].Hint := ''test programmatically? Quote Link to comment Share on other sites More sharing options...
x11 Posted December 2, 2020 Share Posted December 2, 2020 and what error? and more code please when you change trigger? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 2, 2020 Author Share Posted December 2, 2020 When clicking on item 1 in the list of triggers I need to change the image and the tip, this would be in the Triggers event Example if AButtonId = 0 then start if Campo.Triggers [0] .ImageIndex = 0 then start Field.Triggers [0] .ImageIndex: = 1; Campo.Triggers [0] .Hint: = 'Check False'; end other start Field.Triggers [0] .ImageIndex: = 0; Field.Triggers [0] .Tip: = 'Check True'; end; end; Quote Link to comment Share on other sites More sharing options...
x11 Posted December 2, 2020 Share Posted December 2, 2020 please, use code tags Quote Link to comment Share on other sites More sharing options...
x11 Posted December 2, 2020 Share Posted December 2, 2020 9 minutes ago, picyka said: start start? what is it? can you show the working code that compiles without errors? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 2, 2020 Author Share Posted December 2, 2020 I'm sorry, I don't have the code here, but to sum up, I need to change the data of a Triggers in rumtime, something like this: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniDBLookupComboBox1.JSInterface.JSCall('getTriggers().t1.setImageIndex', [0]); //t1, t2, t3, ... UniDBLookupComboBox1.JSInterface.JSCall('getTriggers().t1.setHint', ['Test']); //t1, t2, t3, ... end; Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 2, 2020 Share Posted December 2, 2020 1 hour ago, picyka said: I'm sorry, I don't have the code here, but to sum up, I need to change the data of a Triggers in rumtime, something like this: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniDBLookupComboBox1.JSInterface.JSCall('getTriggers().t1.setImageIndex', [0]); //t1, t2, t3, ... UniDBLookupComboBox1.JSInterface.JSCall('getTriggers().t1.setHint', ['Test']); //t1, t2, t3, ... end; Hi, You can't change image of trigger in runtime. You should add 2 triggers and hide-show them. Please Check Quote Link to comment Share on other sites More sharing options...
picyka Posted December 2, 2020 Author Share Posted December 2, 2020 6 minutes ago, Hayri ASLAN said: Hi, You can't change image of trigger in runtime. You should add 2 triggers and hide-show them. Please Check Hummm .. I will try. Quote Link to comment Share on other sites More sharing options...
picyka Posted December 3, 2020 Author Share Posted December 3, 2020 I was unable to do what I need, attached a picture of the field. When I click on trigger 1 I need to change its color, and also change a new property in the component called property CheckExcept: Boolean Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 3, 2020 Share Posted December 3, 2020 5 hours ago, picyka said: I was unable to do what I need, attached a picture of the field. When I click on trigger 1 I need to change its color, and also change a new property in the component called property CheckExcept: Boolean Hello, Can you make a simple testcase!? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 3, 2020 Author Share Posted December 3, 2020 5 hours ago, Sherzod said: Hello, Can you make a simple testcase!? Good morning, in summary, I need a component where, I can filter more than one record storing in a list (it is important that the remotequery works) I need that component to have a checkBox next to it, so that the user can be checking the option , this markup will take effect in sql, example if component.CheckedExcept then Sql.Add (true) else Sql.Add (False) I like to customize my components, this gives a lot of agility in development. Quote Link to comment Share on other sites More sharing options...
picyka Posted December 3, 2020 Author Share Posted December 3, 2020 Attached is an example, I select more than one record, I can click on the red ball, which will change the color and will change an internal property, this one is in angularJs. Quote Link to comment Share on other sites More sharing options...
picyka Posted December 3, 2020 Author Share Posted December 3, 2020 Any suggestions or tips? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 10, 2020 Author Share Posted December 10, 2020 ☹️ Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 11, 2020 Share Posted December 11, 2020 Hi, You can achieve this with the link i sent. Have you tried it? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 11, 2020 Author Share Posted December 11, 2020 5 minutes ago, Hayri ASLAN said: Hi, You can achieve this with the link i sent. Have you tried it? Good morning, yes, I just don't have the test here, but as I did. I put two items on Triggers, item0 = visible true item1 = visible false clicking on item0 would make it visible false and item1 visible true, but that gives error. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 11, 2020 Share Posted December 11, 2020 Just now, picyka said: item0 = visible true item1 = visible false "Please add 2 triggers to the edit. Set both visible:=True;" You should set visible to true Quote Link to comment Share on other sites More sharing options...
picyka Posted December 11, 2020 Author Share Posted December 11, 2020 On 12/3/2020 at 8:41 AM, picyka said: Attached is an example, I select more than one record, I can click on the red ball, which will change the color and will change an internal property, this one is in angularJs. It wouldn't meet my reality, I need an indicator inside the field, even a checkbox would do. Just look at the attached images. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 11, 2020 Share Posted December 11, 2020 So you want to add this triggers to UniTagField component? Quote Link to comment Share on other sites More sharing options...
picyka Posted December 11, 2020 Author Share Posted December 11, 2020 3 minutes ago, Hayri ASLAN said: So you want to add this triggers to UniTagField component? I really liked CheckCombobox, but RemoteQuery doesn't work, I will use this component in large tables. 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.