Jump to content

Popupmenu: How to add a title or convert first item into one?


Recommended Posts

Posted
2 hours ago, estrify said:

I need to add a title

Hi,

One possible solution I think.

1. 

type
  TXPopupMenu = class(TUniPopupMenu)

  end;

2. 

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface.JSConfig('title', ['NewTitle']);
end;

3. CustomCSS:

.x-title.x-menu-header-title {
    height: 25px;
    text-align: center;
    font-weight: bold;
    background-image: linear-gradient(#dae7f6, #cddef3 45%, #abc7ec 46%, #abc7ec 50%, #b8cfee 51%, #cbddf3);
}

 

  • Like 1

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