Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabControl Problem

Status
Not open for further replies.

DarkConsultant

Programmer
Dec 4, 2007
156
GB
Hi Again,

I have another problem .. so it goes

I am using a TabControl with several tab pages. When users have finished entering data on a tab page they have to click a button which is off the TabControl on the form containing the TabControl.

The button always takes two clicks, the first to give the button focus and then the actual click. Am I missing something?

TIA

David

DarkConsultant

Live long and prosper \\//
 
Check your validation on the tab control or controls on the tab pages. Other control validation methods may be stopping the first click of the button but after the control validation has been passed, the second click may trigger the call on the button.
Only a thought!

for example
Textbox1.validating ... This checks that the text box contains a valid entry, something to your liking. If validation has passed, it allows focus to be set on another object but may not process the click event of a button receiving focus.

Before clicking the button, use your tab key or click another object before trying to click the button. This might help identify a pattern if it is validation thats stopping the button click event.

Hope this makes sense!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top