Enable tabbing in fields ReadOnly = true | Visual Studio

0

Hello,

I have this code in the event of the ComboBox, when I select that it is Physical person it enables the pertinent fields and blocks the ones of "Legal" person and vice versa. But it is still possible for me to move over the fields disabled by the tab / / but clicking .. (I can not type anything

asked by anonymous 21.09.2017 / 18:35

1 answer

1

For TAB do not focus on element use:

txtMeuControle.TabStop = false;

You can still click and select the control, so you can not click on the control, probably only by disabling it:

txtMeuControle.Enabled = false;

This will replace TabStop with the desired functionality.

    
21.09.2017 / 18:42