Jump to content


How to assign custom procedure to OnClickButton method?


  • Please log in to reply
2 replies to this topic

#1 ttsoftware

ttsoftware
  • Members
  • 4 posts

Posted 13 January 2012 - 06:59 PM

Hello,
when I am creating TNxButtonItem in code I need to assign my own procedure to onclickButton method.
Something like:   
  
  NxButtonItem.OnButtonclick:= MyOnButtonclick ;

Can you post some example?

Thank you very much.
Tom

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 6,683 posts
  • Gender:Male

Posted 13 January 2012 - 11:04 PM

Hi Tom,

All you need is to declare procedure like this:

procedure TForm1.MyButtonclick(Sender: TNxPropertyItem);
begin
end;

MyButtonItem.OnButtonclick := MyButtonclick;

I hope that this helps
boki@bergsoft.net
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 ttsoftware

ttsoftware
  • Members
  • 4 posts

Posted 14 January 2012 - 12:03 AM

Hi, Boki,
yes, that is great!
Thank you!
Tom




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users