Jump to content


Photo

UniPopupMenu 'beforeInit' for customizing


  • Please log in to reply
5 replies to this topic

#1 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 683 posts
  • LocationKufur Kassem, Palestine

Posted 15 March 2017 - 02:58 PM

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?


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3475 posts

Posted 15 March 2017 - 05:50 PM

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.


  • 2

#3 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 683 posts
  • LocationKufur Kassem, Palestine

Posted 17 March 2017 - 09:18 AM

Thank you very much... B)


  • 0

#4 GerhardV

GerhardV

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 134 posts
  • LocationSouth Africa

Posted 17 March 2017 - 12:09 PM

Is there something similar for TUniMainMenu?


  • 0

uniGUI - LOVE IT!


#5 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3475 posts

Posted 17 March 2017 - 05:54 PM

Hi,

 

Is there something similar for TUniMainMenu?

 

We will try to analyze.

 

Best regards.


  • 0

#6 delagoutte

delagoutte

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 297 posts

Posted 04 August 2017 - 08:48 AM

hello,

If i would do the same thing but for each item of unipopupmenu. how can i do this ?

I would define different iconcls for my item menu


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users