Frederick Posted August 26, 2020 Posted August 26, 2020 I have a TUniStatusBar which I set as follows in the OnShow event of the form:- with staBar.JSInterface do begin JSCode(#1'.getRefItems()[0].setStyle("font-weight", "bold");'); JSCode(#1'.getRefItems()[0].setStyle("color", "black");'); JSCode(#1'.getRefItems()[0].setStyle("background-color", "powderblue");'); end; When the program is run, the "Ready" text in the panel is hugging the top (1) and there is a white gap on the right (2). How do I get the text to align vertically in the centre and how do I get rid of the white gap on the right? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1534) Quote
Frederick Posted August 26, 2020 Author Posted August 26, 2020 6 hours ago, Sherzod said: Hello, Can you please attach a testcase? Please find attached. Hint: The problem occurs when the theme is uni_flat_black and not classic. statusbar2.zip Quote
Sherzod Posted August 27, 2020 Posted August 27, 2020 7 hours ago, Frederick said: statusbar2.zip Can you try to use this approach? 1. UniStatusBar.ClietnEvents.UniEvents -> beforeInit: function beforeInit(sender, config) { config.cls = 'customBar'; } 2. CustomCSS: .customBar .x-box-inner { top: -1px; } .customBar .x-toolbar-item { width: 100% !important; } Quote
Frederick Posted August 27, 2020 Author Posted August 27, 2020 The CustomCSS code for vertically aligning the text seems to do nothing. However, the gap is now gone. Quote
Sherzod Posted August 27, 2020 Posted August 27, 2020 9 minutes ago, Frederick said: The CustomCSS code for vertically aligning the text seems to do nothing. .customBar .x-box-inner { top: -1px; } .customBar .x-toolbar-item { width: 100% !important; line-height: 1.9em; } Quote
Frederick Posted August 27, 2020 Author Posted August 27, 2020 The text is now vertically aligned. Thank you. 1 Quote
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.