Re: How to change textbox font color when disable ?
engteng wrote:
When textbox properties enable = False the font in the textbox become gray
color. How do I change the gray color to black color ?
If your users have had Windows PC's for more than about three days, then
you should not do this, unless you have a really, /really/ Good Reason
to do so (e.g. specialised applications for, say, poorly-lit working
conditions).
Grey text on disabled controls is /standard/ Windows behaviour that will
be exhibited when your application runs on practically every Windows PC
on the planet.
OK, there /are/ a few cases where this is justifiable; just so long as
(a) you realise that there are /very/ few such cases, and
(b) your users know in advance that your application is going to behave
this way.
Applications that do "odd" things may be reported as "buggy" or
un-installed completely (just try changing the screen resolution on me!)
:-)
Re: How to change textbox font color when disable ?
"engteng" <passrcv@gmail. com>'s wild thoughts were released
on Wed, 8 Oct 2008 18:23:47 +0800 bearing the following
fruit:
>When textbox properties enable = False the font in the textbox become gray
>color. How do I change the gray color to black color ?
>
Normally when someone asks this it's because someone finds
the grey text hard to see. In which case they sould change
this colour on their PC to something other than grey.
RE: How to change textbox font color when disable ?
engteng:
I see what you are trying to do. Instead of setting the TextBox's Enabled
Property to False, try setting the ReadOnly Property to True.
I bet you a dollar this is what you are trying to accomplish.
"engteng" wrote:
When textbox properties enable = False the font in the textbox become gray
color. How do I change the gray color to black color ?
>
>
Regards,
Tee
>
>
>
Re: How to change textbox font color when disable ?
This will do but what is the best way to avoid this textbox to have gotfocus
even it is readonly ?
Regards,
Tee
"jp2msft" <jp2msft@discus sions.microsoft .comwrote in message
news:3BB9903A-B7BD-44DB-AFDC-64D799A4356B@mi crosoft.com...
engteng:
>
I see what you are trying to do. Instead of setting the TextBox's Enabled
Property to False, try setting the ReadOnly Property to True.
>
I bet you a dollar this is what you are trying to accomplish.
>
"engteng" wrote:
>
>When textbox properties enable = False the font in the textbox become
>gray
>color. How do I change the gray color to black color ?
>>
>>
>Regards,
>Tee
>>
>>
>>
"engteng" <passrcv@gmail. com>'s wild thoughts were released
on Wed, 8 Oct 2008 18:23:47 +0800 bearing the following
fruit:
>
>>When textbox properties enable = False the font in the textbox become gray
>>color. How do I change the gray color to black color ?
>>
>
Normally when someone asks this it's because someone finds
the grey text hard to see. In which case they sould change
this colour on their PC to something other than grey.
>
>
--
Jan Hyde (VB MVP)
> https://mvp.support.microsoft.com/profile/Jan.Hyde
Re: How to change textbox font color when disable ?
textbox.Next maybe
Cor
"engteng" <passrcv@gmail. comschreef in bericht
news:ejFmDreKJH A.4708@TK2MSFTN GP02.phx.gbl...
This will do but what is the best way to avoid this textbox to have
gotfocus even it is readonly ?
>
>
Regards,
Tee
>
"jp2msft" <jp2msft@discus sions.microsoft .comwrote in message
news:3BB9903A-B7BD-44DB-AFDC-64D799A4356B@mi crosoft.com...
>engteng:
>>
>I see what you are trying to do. Instead of setting the TextBox's Enabled
>Property to False, try setting the ReadOnly Property to True.
>>
>I bet you a dollar this is what you are trying to accomplish.
>>
>"engteng" wrote:
>>
>>When textbox properties enable = False the font in the textbox become
>>gray
>>color. How do I change the gray color to black color ?
>>>
>>>
>>Regards,
>>Tee
>>>
>>>
>>>
Re: How to change textbox font color when disable ?
On Oct 9, 11:38 am, "engteng" <pass...@gmail. comwrote:
This will do but what is the best way to avoid this textbox to have gotfocus
even it is readonly ?
>
Regards,
Tee
>
"jp2msft" <jp2m...@discus sions.microsoft .comwrote in message
>
news:3BB9903A-B7BD-44DB-AFDC-64D799A4356B@mi crosoft.com...
>
>
>
engteng:
>
I see what you are trying to do. Instead of setting the TextBox's Enabled
Property to False, try setting the ReadOnly Property to True.
>
I bet you a dollar this is what you are trying to accomplish.
>
"engteng" wrote:
>
When textbox properties enable = False the font in the textbox become
gray
color. How do I change the gray color to black color ?
>
Regards,
Tee- Hide quoted text -
>
- Show quoted text -
It maybe considered as a primitive way, but you can try to handle your
ReadOnly Textbox's GotFocus event and when it gets focus then focus
another UI control to lose focus of textbox as follows:
'---------------------------------------------------
Private Sub TextBox1_GotFoc us(ByVal sender As Object, _
ByVal e As System.EventArg s) Handles TextBox1.GotFoc us
' when it gets focus select another control
Textbox1.Select NextControl
' ...OR focus another control manually
' eg: a button
Button1.Focus
End Sub
'-----------------------------------------------------
I see what you are trying to do. Instead of setting the TextBox's Enabled
Property to False, try setting the ReadOnly Property to True.
>
I bet you a dollar this is what you are trying to accomplish.
>
"engteng" wrote:
>
>When textbox properties enable = False the font in the textbox become
>gray
>color. How do I change the gray color to black color ?
>
>Regards,
>Tee- Hide quoted text -
>
- Show quoted text -
>
It maybe considered as a primitive way, but you can try to handle your
ReadOnly Textbox's GotFocus event and when it gets focus then focus
another UI control to lose focus of textbox as follows:
>
'---------------------------------------------------
Private Sub TextBox1_GotFoc us(ByVal sender As Object, _
ByVal e As System.EventArg s) Handles TextBox1.GotFoc us
>
' when it gets focus select another control
Textbox1.Select NextControl
>
' ...OR focus another control manually
' eg: a button
Button1.Focus
>
End Sub
'-----------------------------------------------------
>
Hope this helps,
>
Onur Güzel- Hide quoted text -
>
- Show quoted text -
Regarding to SelectNextContr ol in my previous post, as i forgot, don't
forget to pass required arguments mentioned on:
>"engteng" <passrcv@gmail. com>'s wild thoughts were released
>on Wed, 8 Oct 2008 18:23:47 +0800 bearing the following
>fruit:
>>
>>>When textbox properties enable = False the font in the textbox become gray
>>>color. How do I change the gray color to black color ?
>>>
>>
>Normally when someone asks this it's because someone finds
>the grey text hard to see. In which case they sould change
>this colour on their PC to something other than grey.
>>
>>
>--
>Jan Hyde (VB MVP)
>>
>https://mvp.support.microsoft.com/profile/Jan.Hyde
Comment