Jump to content

HowTo: Change background color showmessage problem


mierlp

Recommended Posts

hi

 

When using a theme the most showmessage are displayed with a clBtnFace background
instead of white. See attachement. The background of the text area is clBtnFace.

 

The behavior of a showmessage depends on the theme you are using.

 

How to change the background text area ?

 

Regards Peter

 

 

post-510-0-13975800-1499892089_thumb.png

Link to comment
Share on other sites

Hi,

 

Can you try to use this approach for now ?!

 

For example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  MessageDlg('Dialog1', mtWarning, [mbOK], DCallBack);
  UniSession.AddJS('Ext.select("#messagebox-1001-body").elements[0].style.backgroundColor="white";');     //<-----
end;

Best regards,

Link to comment
Share on other sites

  • 1 year later...

Add to CustomCSS:

.x-message-box .x-window-body {
    background-color: #fff;
}
.x-message-box > .x-window-bodyWrap > .x-toolbar-footer {
	background-color: #fff;
}

You can also add it to the any of the theme CSS files if you only want it for a spesific theme, for example:

..\FMSoft\Framework\uniGUI\unipackages-6.5.3\themes\css\uni-xtheme-uni_classic.css

Link to comment
Share on other sites

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...