Ed's suggestion for BindEvents would be a runtime solution.
Are you trying to add code to the Click method at design time? (I could read
your question either
way <g>)
If so:
lcMethodCode = 'Messagebox("hi")'
oButton.WriteMethod("Click", lcMethodCode)
Rick
White Light Computing, Inc.
www.whitelightcomputing.com
www.swfox.net
www.rickschummer.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vince Teachout
Sent: Wednesday, July 23, 2008 07:20 PM
To: [EMAIL PROTECTED]
Subject: Can I programattically set method code?
Is this possible?
In Development mode, I hover my mouse over a button on a form, then
without moving the mouse, type oButton = Sys(1270) in the command window
and hit enter. This creates an object pointer to the button, and I can
then do something like oButton.Caption = "Wow!", causing the the caption
on the form button to change.
My question is, can I do something similar, with code, in say, the
ClicK() method?
ie, something like: oButton.Click = 'Messagebox("hi")' (which,
obviously doesn't work, neither does obutton::click = 'Messagebox("hi")'
Anyway to do this? Thanks.
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.