Jump to content
uniGUI Discussion Forums
mhmda

UniPopupMenu 'beforeInit' for customizing

Recommended Posts

There is no clientevents (I know this is a menu) but I want to assign a css class to it, how can I do that?

Share this post


Link to post
Share on other sites

Hi Mohammad,

 

You can try to use like this:

type
  TXPopupMenu = class(TUniPopupMenu)

  end;
procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
  begin
    JSConfig('cls', ['test']);
    JSConfig('bodyCls', ['test1']);
    JSConfig('disabledCls', ['test2']);
    JSConfig('headerOverCls', ['test3']);
    JSConfig('iconCls', ['test4']);
    JSConfig('overCls', ['test5']);
  end;
end;

Best regards.

  • Upvote 2

Share this post


Link to post
Share on other sites

×