AcceptsTab not working

rbulph

Junior Contributor
Joined
Feb 17, 2003
Messages
397
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?
 
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.
 
Back
Top