x11 Posted December 13, 2021 Author Share Posted December 13, 2021 up Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 13, 2021 Share Posted December 13, 2021 On 12/10/2021 at 5:07 PM, x11 said: прошло уже полгода.... так как же все-таки сделать меню шире? procedure TMainmForm.UnimFormReady(Sender: TObject); begin ... with UnimToolButton1.JSInterface do begin JSConfig('arrow', [False]); JSConfig('iconCls', ['fas fa-sort']); JSCall('setMenu', [JSArray([UnimRadio1.JSControl, UnimRadio2.JSControl])]); JSCode(#1'.getMenu().on("beforeshow", function(){this.setMinWidth(300)});'); //<-------- end; end; 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 13, 2021 Share Posted December 13, 2021 On 12/10/2021 at 5:29 PM, x11 said: как указать Cls для выпадающего меню? Например, чтобы потом можно было поменять цвет выпадающего меню и др. свойства. К примеру: 1. procedure TMainmForm.UnimFormReady(Sender: TObject); begin ... with UnimToolButton1.JSInterface do begin ... JSCode(#1'.getMenu().on("beforeshow", function(){this.setCls("customMenu"); this.setMinWidth(300)});'); end; end; 2. CustomCSS .customMenu .x-body-el { background: green; } .customMenu .x-label-el { color: white; } 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.