m***@gmail.com
2007-02-01 17:24:00 UTC
Hi there...
We're using VB6 and FarPoint's vaTabPro control. Basically, we have a
number of controls on a number of tabs (assigned at design time), and
an Update button. One of the consequences of pushing the update button
is that some code runs checking mandatory entries, and if it finds one
that is not filled in we present a messagebox informing the user of
the problem, and set focus back to the control in question... Because
the control might be on a differet tab to the one currently being
displayed, this means that we need to know the tab each code is on so
we can make it the Active Tab before calling .SetFocus.
Our current solution is to store strings in the resource file
detailing which tabs the various controls can be found on, but
everyone once in a while someone sticks a new control on the tab
control, and forgets to update the resource file - which is annoying,
and leads to bug reports when the control doesn't receive focus. So,
I'd like to move away from this idea...
What I want to do is write a function that accepts, as arguments, both
a vaTabPro control and then one of the input controls - then
programatically determines which tab (if any) the control is on. In
doing this, it shouldn't update the screen at all - we don't want to
cycle through making every tab visible, as this would look bad...
Any ideas?
Martin.
We're using VB6 and FarPoint's vaTabPro control. Basically, we have a
number of controls on a number of tabs (assigned at design time), and
an Update button. One of the consequences of pushing the update button
is that some code runs checking mandatory entries, and if it finds one
that is not filled in we present a messagebox informing the user of
the problem, and set focus back to the control in question... Because
the control might be on a differet tab to the one currently being
displayed, this means that we need to know the tab each code is on so
we can make it the Active Tab before calling .SetFocus.
Our current solution is to store strings in the resource file
detailing which tabs the various controls can be found on, but
everyone once in a while someone sticks a new control on the tab
control, and forgets to update the resource file - which is annoying,
and leads to bug reports when the control doesn't receive focus. So,
I'd like to move away from this idea...
What I want to do is write a function that accepts, as arguments, both
a vaTabPro control and then one of the input controls - then
programatically determines which tab (if any) the control is on. In
doing this, it shouldn't update the screen at all - we don't want to
cycle through making every tab visible, as this would look bad...
Any ideas?
Martin.