Jump to content

HowTo: Change background color showmessage problem


Recommended Posts



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




Link to comment
Share on other sites



Can you try to use this approach for now ?!


For example:

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

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:


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.

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