LKearney
asked on
TextChanged doesn't fire until TabPage clicked
Hi Thanks for clicking.
We have a Textbox (bound via BindingSource) on a TabPage
The textchanged event doesn't fire until that TabPage that the textbox is on is clicked
Can anybody see a way around this or know why it's happening, I'd be most grateful for your thoughts??
Thanks so much
We have a Textbox (bound via BindingSource) on a TabPage
The textchanged event doesn't fire until that TabPage that the textbox is on is clicked
Can anybody see a way around this or know why it's happening, I'd be most grateful for your thoughts??
Thanks so much
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the extra time required is all the work that has to be done by the application (all your events handlers). not much can be done.
I don't know how you build your application but why is an event (TextChanged) is important for you on invisible controls?
I don't know how you build your application but why is an event (TextChanged) is important for you on invisible controls?
ASKER
Hi Emoreau,
Good question!
We have code in each of our TextChanged events for all our bound textboxes on all our Tabpages that puts the form into Edit Mode. This Edit Mode code effectively locks that record for all other users in the network, and enableds the Save button and Abandon button. Since the current user is currently editing the record, there can only be two outcomes Save or Abandon.
It is legacy code from our original software programmed in Access. We have now converted over to using BindingSource as our middleware to bind each textbox on our form.
Obiously we'd love to be able to remove all the TextChanged event (sometime 50+) for all Textboxes and have them consolidated in ONE BindingSource event. However, could only see the BindingComplete event that fired, but unfortunately this only fires on moving out of the Textboxes.
If you have any suggestion, we'd be most grateful for your guidance!!
Good question!
We have code in each of our TextChanged events for all our bound textboxes on all our Tabpages that puts the form into Edit Mode. This Edit Mode code effectively locks that record for all other users in the network, and enableds the Save button and Abandon button. Since the current user is currently editing the record, there can only be two outcomes Save or Abandon.
It is legacy code from our original software programmed in Access. We have now converted over to using BindingSource as our middleware to bind each textbox on our form.
Obiously we'd love to be able to remove all the TextChanged event (sometime 50+) for all Textboxes and have them consolidated in ONE BindingSource event. However, could only see the BindingComplete event that fired, but unfortunately this only fires on moving out of the Textboxes.
If you have any suggestion, we'd be most grateful for your guidance!!
ASKER
A bit slower, but don't think there's any other way around it.
Thanks so much for your help!
Thanks so much for your help!
ASKER
Have implemented this code.
For each TabPage in TabControl
TabPage.Show
Next TabPage
This works perfect except for the 19% speed limitations on our software.
Is '.Show' the right method since couldn't find Activate??
Is the extra 19% speed limitation due to the TabPage showing or does the majority of the speed addon come from the TextChanged events fired from Showing the Tab in the first place??
If it's the TextChanged event don't think there's any speed optimisation we can do, if TabPage issue, then might be able to find another way to keep speed optimised!
Looking forward to your reply just to finalise the post.
Thanks so much