Author: Ed Leafe, ed@leafe.com
Posted: 1999-10-08 at 11:59:29
On 10/8/99 11:44 AM, Michael Babcock supposedly said:
>I have a subclassed form "frmDates". I want to use class, but slightly
>change
>the functionality of two of its textboxes right-click event. Must I do
>another DEFINE or is there a way to directly change the logic for an item for
>this instance only? Examples are greatly appreciated!
>
>'sortof' pseudo-code of what I want to accomplish:
> oFrm = createobject("frmDates")
> oFrm.MyTxtBox.rt-click procedure = <change of logic>
You cannot modify the code of an instance. You'll either have to
subclass, or bracket your RightClick() code to do different things based
on some form property:
DO CASE
CASE Thisform.cBehavior = "Foo"
{do 'foo' right-click stuff}
CASE Thisform.cBehavior = "Bar"
{do 'bar' right-click stuff}
ENDCASE
Then when you create your form, do the following:
oFrm = createobject("frmDates")
oFrm.cBehavior = "Bar"
oFrm.Show()
___/
/
__/
/
____/
Ed Leafe