Marco Hsu Posted October 21, 2020 Posted October 21, 2020 I want to set UnimSegmentedButton's Image above the text,like the second image. Tks!
Sherzod Posted October 21, 2020 Posted October 21, 2020 49 minutes ago, Marco Hsu said: I want to set UnimSegmentedButton's Image above the text,like the second image. Tks! Hello, One possible solution: procedure TMainmForm.UniFormCreate(Sender: TObject); begin UnimSegmentedButton1.JSInterface.JSAddListener( 'painted', 'function(){this.getItems().each(function(button){button.setIconAlign("top")})}' ); end;
Marco Hsu Posted October 21, 2020 Author Posted October 21, 2020 1 hour ago, Sherzod said: Hello, One possible solution: procedure TMainmForm.UniFormCreate(Sender: TObject); begin UnimSegmentedButton1.JSInterface.JSAddListener( 'painted', 'function(){this.getItems().each(function(button){button.setIconAlign("top")})}' ); end; Thank you,but I have a small question: I cannot set the Image's Height and Wight.The Image is very small when the form is showing.
Marco Hsu Posted October 21, 2020 Author Posted October 21, 2020 2 minutes ago, Sherzod said: Can you make a simple testcase to check? Ok kaoqinyi.rar
Sherzod Posted October 22, 2020 Posted October 22, 2020 19 hours ago, Marco Hsu said: kaoqinyi.rar 5.67 MB · 5 downloads Hello, Try this: sgbtn1.JSInterface.JSAddListener( 'painted', 'function(){this.getItems().each(function(button){button.setIconAlign("top"); button.iconElement.setStyle("width", "64px"); button.iconElement.setStyle("height", "64px");})}' );
Marco Hsu Posted October 22, 2020 Author Posted October 22, 2020 2 hours ago, Sherzod said: Hello, Try this: sgbtn1.JSInterface.JSAddListener( 'painted', 'function(){this.getItems().each(function(button){button.setIconAlign("top"); button.iconElement.setStyle("width", "64px"); button.iconElement.setStyle("height", "64px");})}' ); OK,Tks! 1
Recommended Posts