Freeman35 Posted May 10, 2019 Share Posted May 10, 2019 Hello, I have a toolbar and has some buttons. I wanna add help button on this toolbar, but to toolbar's right. How to do this? Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 10, 2019 Share Posted May 10, 2019 25 minutes ago, Freeman35 said: I have a toolbar and has some buttons. I wanna add help button on this toolbar, but to toolbar's right. How to do this? Hi, One possible solution: Your UniToolButton (Help button) -> ClientEvents -> ExtEvents -> function added: function added(sender, container, pos, eOpts) { container.insert(pos, {xtype: 'tbfill'}); } Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted May 10, 2019 Author Share Posted May 10, 2019 Always perfect My plan is, this button's caption be just "?" so I have to set button with. 'cos after added your solution, button not be end of right Thank you so much for helps. I'll fix padding .help-btn__ { background-color: red; width: 30px!important; /* */ border-radius: 50%; } If I remove with from css works espected. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted May 10, 2019 Author Share Posted May 10, 2019 procedure T_FRM_.UniFormCreate(Sender: TObject); begin BTN_Help.Width:= 30; Sometime answer is so easy Quote Link to comment Share on other sites More sharing options...
jahlxx Posted January 7, 2020 Share Posted January 7, 2020 On 5/10/2019 at 3:18 PM, Sherzod said: Hi, One possible solution: Your UniToolButton (Help button) -> ClientEvents -> ExtEvents -> function added: function added(sender, container, pos, eOpts) { container.insert(pos, {xtype: 'tbfill'}); } Hi friend. This works with one toolbutton. But, what about id I need 2 buttons right aligned? I've tested, and the result is not ok. Any way to do it? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 7, 2020 Share Posted January 7, 2020 1 minute ago, jahlxx said: This works with one toolbutton. But, what about id I need 2 buttons right aligned? I've tested, and the result is not ok. Hi, Can you please make a simple testcase? Quote Link to comment Share on other sites More sharing options...
jahlxx Posted January 7, 2020 Share Posted January 7, 2020 Is necesary a test case for this? This is an image of the toolbar: For both buttons I added this, and that is the result: function added(sender, container, pos, eOpts) { container.insert(pos, {xtype: 'tbfill'}); } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 7, 2020 Share Posted January 7, 2020 21 minutes ago, jahlxx said: For both buttons I added this, and that is the result: You need add only for the first button, which should be aligned on the right side. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted January 7, 2020 Share Posted January 7, 2020 Great!! Thanks. 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.