Jump to content

How To Vertically Align Text And Remove Gap At Right In TUniStatusBar?


Recommended Posts

Posted

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)
 

tunistatusbar.png

Posted
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;
}

 

Posted
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;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...