A
AussieRules
Hi,
I have a form with many textbox on it. Behind this(so to speak), is a class,
and each time the user changes the value of the text box I want to update
the relevant property of the class.
I have the class.property = txtbox.text set on the textbox.leave event, and
this works fine, except for when the user clicks on my toolbar button to
save the details to the database.
The problem is that the last text box that they where in, does not fire the
leave event, when the toolbar button is clicked.
I though a good idea was to place a hidden text box on the form, and the
first thing that happens when the user clicks the button is that i set the
focus to the hidden text box, forcing the leave event to fire on the
previous text box.
I cann't see the old VB6 setfocus event for a text box, so I though that if
I just did txtHiddenTextbox.text = 'eee' it would work, but it seems that it
does not.
Any way aroud this, or better suggestion.
I had thought of updating the class on the keydown event, but I figured that
was not a effiecent way of doing this.
Regards
I have a form with many textbox on it. Behind this(so to speak), is a class,
and each time the user changes the value of the text box I want to update
the relevant property of the class.
I have the class.property = txtbox.text set on the textbox.leave event, and
this works fine, except for when the user clicks on my toolbar button to
save the details to the database.
The problem is that the last text box that they where in, does not fire the
leave event, when the toolbar button is clicked.
I though a good idea was to place a hidden text box on the form, and the
first thing that happens when the user clicks the button is that i set the
focus to the hidden text box, forcing the leave event to fire on the
previous text box.
I cann't see the old VB6 setfocus event for a text box, so I though that if
I just did txtHiddenTextbox.text = 'eee' it would work, but it seems that it
does not.
Any way aroud this, or better suggestion.
I had thought of updating the class on the keydown event, but I figured that
was not a effiecent way of doing this.
Regards