General information
Category:
Object Oriented Programming
Title:
Default button behavior
In my application, I have a single form which contains a pageframe where the bulk of data entry is done. I have a command button on the main form which is hidden. I have programmed this button with a case structure to behave in a specific manner depending on which page frame is active when the user hits the {ENTER} key. Usually, this behavior is to activate a command button on the tab which populates the screen with data. The case structure in the default button's Click() property is basically like the following
DO CASE
CASE PageFrame.ActivePage = 1
PageFrame.Page1.cmdDisplay.Click()
CASE Pageframe.ActiveaPage = 2
Pageframe.Page2.cmdDisplay.Click()
----- etc
ENDCASE
What I need to happen is when the ActivePage is the first tab, hitting ENTER does nothing. For the other tabs hitting enter should fire the default behavior. I have tried to set and rest the default button's Default property from .T. to .F. but when I trace with the debugger, the property resets to .T. at some point I have not been able to determine, but before my code resets the property to .T.
What might I be missing? TIA
Richard Bates
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