I'm running vb.net with vs2012. I have various CheckBoxes
that Enable
and Disable
TextBoxes
. I've noticed that if a user has their cursor in the TextBox
(when Enabled), and then click
the CheckBox
to Disable
the TextBox
, the TextBox
appears inset. This only occurs when the cursor is in the TextBox
while the user clicks the CheckBox
to Disable
the TextBox
.
I also noticed that if I throw up a message box right before the TextBox
is Disabled
, the TextBox
does NOT appear inset; I assume because the focus has changed. Because of this, I tried setting the focus to another control before disabling the TextBox
, however, this does not work. Is there anyway I can get around this so that my TextBox
do not appear inset when a user disables them while having their cursor in the box?
Thanks!
当您设置Textbox.enabled=False
,它将出现,但如果您将Textbox.Visible=False
设置, Textbox.Visible=False
它不会出现
如果将TextBox的BorderStyle设置为BorderStyle.FixedSingle
,则应获得所需的行为。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.