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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrow Keys with TabControl & TextBox

Status
Not open for further replies.

Casbah

Programmer
May 18, 2004
31
IE
Hi I'm noticing some really annoying behaviour with textboxes that are placed on a tab page within a tab control on a winform.
When I press the left and right arrow keys whilst the text box is focuset rather than moving the caret left and right the tab page is changing on me.
Is there anyway to remedy this?
Thanks
 
I am unable to replicate this behavior. How are you setting focus on the textbox?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Simply running the application and clicking into the text box. I am then monitoring the keydown event... When I press arrow up or arrow down it fires and works ok. When I press left or right it doesnt fire but rather the tabcontrol switches tabs.
 
What is the code in the KeyDown event handler?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top