Jump to content

Customize Form - Close button


markokas

Recommended Posts

Hi all,

With following code changed Form window.

I would like to change also Close button color from white to black.

Any idea how to solve this issue?

Thanks in advance.

Marko

Delphi 10.3 rio, UniGui: 1.90.0.1550

 

with Fstate.WebForm.JSInterface do
   begin
     JSAddListener('afterrender', JSFunction('sender','var me=sender; '+
                                             'me.header.el.setStyle({"background-color": "silver"}); '+
                                             'me.header.el.setStyle({"background-image": "none"}); '+
                                             'me.header.titleCmp.el.setStyle({"color": "black"}); '+
                                             'me.el.setStyle({"border": "solid 1px silver"}); '+
                                             'me.el.setStyle({"background-color": "silver"});'));
     JSConfig('baseCls', ['x-panel']);
   end;

 

30-09-2021 15-20-17.png

Link to comment
Share on other sites

49 minutes ago, markokas said:

I would like to change also Close button color from white to black.

Hello,

One possible solution:

function window.afterrender(sender, eOpts)
{
    if (this.tools && this.tools.close) {
        this.tools.close.setHtml('<i class="fas fa-times"></i>');
        /*this.tools.close.setHtml('<i style="color:black" class="fas fa-times"></i>');*/
    }
}

 

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