gerhardhziegler Posted May 26, 2019 Share Posted May 26, 2019 Good morning, folks! Is there any possibility to set the state of an UnimSegmentedButton programmatically? UnimSegmentedButton.Items[n].Pressed:=True or False doesnt show any reaction. Best regards! Quote Link to comment Share on other sites More sharing options...
gerhardhziegler Posted May 26, 2019 Author Share Posted May 26, 2019 3 hours ago, gerhardhziegler said: Good morning, folks! Is there any possibility to set the state of an UnimSegmentedButton programmatically? UnimSegmentedButton.Items[n].Pressed:=True or False doesnt show any reaction. Best regards! Seems to be a sencha problem as well. Additional question: How can I set a BADGE for an Segmented Button? No Chance, I assume. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 26, 2019 Share Posted May 26, 2019 6 hours ago, gerhardhziegler said: Is there any possibility to set the state of an UnimSegmentedButton programmatically? UnimSegmentedButton.Items[n].Pressed:=True or False doesnt show any reaction. with UnimSegmentedButton1 do begin Items[0].Pressed := True; JSInterface.JSCall('setPressed', [True], Items[0].JSMenuItem); end; 1 Quote Link to comment Share on other sites More sharing options...
gerhardhziegler Posted May 29, 2019 Author Share Posted May 29, 2019 Great! Thank Sherzod! May I continue asking of there is a solution for a badge for one of these SegmentedButtons. Best regards, Gerhard 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 29, 2019 Share Posted May 29, 2019 6 hours ago, gerhardhziegler said: May I continue asking of there is a solution for a badge for one of these SegmentedButtons. Hi, Can you try this? UnimFormReady: procedure TMainmForm.UnimFormReady(Sender: TObject); begin with UnimSegmentedButton1 do begin JSInterface.JSCall('setBadgeText', [10], Items[0].JSMenuItem); JSInterface.JSCode('var me='#1'.badgeElement; me.setY(parseInt(me.getY()+4)); me.setStyle("left", null);', Items[0].JSMenuItem); end; end; SetBadgeText, for example: with UnimSegmentedButton1 do JSInterface.JSCall('setBadgeText', ['2019'], Items[0].JSMenuItem); 1 1 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.