Jump to content

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


estrify

Recommended Posts

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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...