all groups > vb.net controls > october 2005 >
You're in the

vb.net controls

group:

Disabled Textbox


Disabled Textbox J French
10/10/2005 12:00:00 AM
vb.net controls:

Is there a way to disable a textbox without having the text within the box
affected or "dimmed" ?
Thanks,

John French

--
jffrenchjr@earthlink.net


Re: Disabled Textbox Matt
10/10/2005 8:39:11 AM
I make a text box read-only and force the fore color to be black.

Matt

[quoted text, click to view]

Re: Disabled Textbox Eric Moreau
10/10/2005 6:39:16 PM
Read "Colors of disabled controls" from my July 2005 articles at
http://pages.videotron.com/emoreau/

--


HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
(http://aspnet2.com/mvp.ashx?EricMoreau)
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://pages.videotron.com/emoreau/

[quoted text, click to view]

Re: Disabled Textbox Ken Halter
10/12/2005 9:44:16 AM
[quoted text, click to view]

My question would be..... how are your users going to know if a control is
disabled if it's not "greyed out" like all other disabled controls they've
ever seen since Windows 1.0 was released? If you disable it without making
it "grey", you should give them some kind of hint that they shouldn't
interact with the control.

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..

Re: Disabled Textbox Ken Halter
10/13/2005 10:39:17 AM
[quoted text, click to view]

fwiw, that's (kind of) what I do... When I disable textboxes, in general, I
set Locked = True (ReadOnly around here, I guess) and change their back
color to vbButtonFace (not sure what the .Net'ish declaration is). Doing
that makes them look like a label. The user doesn't expect to be able to
type in them. They are surprised when they find they can copy text from them
(a bonus <g>).

I figure that.... since quite a few Windows Dialogs use that technique, it
should be Ok for me to use <g> To see a Windows Dialog that works like this,
just right click any file, select Properties. One of the first things to
show on the dialog is a label saying "Type of File", with another "label"
next to it showing the file type. The text in that label can be selected and
copied to the clipboard, so it's surely not a "true" label. Same with the
one that says "Opens With:".... the app name showing in that field can be
selected and copied to the clipboard.

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..

Re: Disabled Textbox jjrdk
10/13/2005 11:56:06 AM
[quoted text, click to view]
You could use the ReadOnly property. Otherwise use a label.

AddThis Social Bookmark Button