Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Does anyone have any idea why AcceptsTab might not be working? I have a class which inherits from TableLayoutPanel and contains a RichTextBox in one of its cells. I have set AcceptsTab to True for the RichTextBox and TabStop to False for the class, the RichTextBox and the other controls that it contains. But when the RTB has focus and the user presses Tab, the focus vanishes - it seems that the RTB loses focus and no other control receives it - it's just lost.

 

I have tried duplicating this in a small project, but can't - the tab key is accepted perfectly well.

 

Any ideas?

Posted
Hmm, it's something to do with the richtextbox ultimately being in an MDI Form. It tabs to the next control in the MDI Form, not a control in the class, as I would have expected. Maybe I need to set the TabStop for all controls in the MDI Form to False to get this to work. I'll come back to this later.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...