Design-Time & Validating User's Input
Tech Support Question
- Q.
I am using TAB/PRO with Visual Basic. I have several controls on one of the
tabs, whose Enabled property I am setting at runtime. However, when I change
to another tab and then switch back, the controls have reverted to their
design-time state.
- A.
When TAB/PRO hides a child control, it sets that controls Enabled property
to false to remove it from the tab order. If you need to change this property
at runtime, use TabSetChildEnabled instead. This will set the Enabled state for
the control, and update internal tables that Tab needs to re-set the control
later. You can find the parameters for TabSetChildEnabled in the Help file.
- Q.
I need to validate the users input before letting them change tabs in TAB/VBX or
/PRO. How can I do this?
- A.
The TabActivate event fires whenever a user clicks on a new tab, before the
actual change to the new tab occurs. In this event you can do your validation
checks. If you need to prevent the change, set TabToActivate to -1, which
will return them to the current tab.
[TECH SUPPORT TOC]
[HOME]
[TABLE OF CONTENTS]
[SEARCH]