I'll be damned. You can do this. Frankly, I didn't believe it. IAC, since you want to move the button, move it. IOW, delete the one on the form and leave the one on your form class. If they're in the same place, then you may need to move the button to an obvious spot in your form class so you can tell the difference.
Don't leave both, but to answer your question, it will probably reference the base class's button, since it would be first to instantiate. But don't leave both.
You didn't ask, but instead of adding the button to your base form class, it would probably be *better* design to subclass the form and put the button on that. But then, of course, you need to change the parent class of your .SCX.
>I have a form with a button named cmdOk.
>
>I want to move the button to the parent
>class, so I opened the parent class, added
>a button and named it cmdOk.
>
>When I reopened the child class, there now
>are 2 buttons with the same name.
>
>So how does VFP know which button to reference
>if I called cmdOk.Click()?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only