Textbox, Enable-Property, Graystyle 
Author Message
 Textbox, Enable-Property, Graystyle

I set the Enable-property of a control (i.e. a Textbox) to False. Now I'd
like the foreground-color to stay black instead of gray. Is this possible
and how ???



Sat, 09 Oct 1999 03:00:00 GMT  
 Textbox, Enable-Property, Graystyle

The Enabled color is taken from the Windows System Display Information so I
don't think that you can change it.  However if you are just talking about
a textbox, set the Locked property to true.  Then it can't be edited, but
the color remains the .ForeColor property.



Quote:
> I set the Enable-property of a control (i.e. a Textbox) to False. Now I'd
> like the foreground-color to stay black instead of gray. Is this possible
> and how ???



Sat, 09 Oct 1999 03:00:00 GMT  
 Textbox, Enable-Property, Graystyle


13:53:22 GMT):

Quote:
>I set the Enable-property of a control (i.e. a Textbox) to False. Now I'd
>like the foreground-color to stay black instead of gray. Is this possible
>and how ???

You lucky one: There's a bug in VB that allows you to do so:
Just set the textbox's Multiline-property to true while it's
disabled and there you go.

Apart from that, VB4 offers the .locked-property for this, a
VB3-solution is given in the FAQ (link below).

Mathias Schiffer, Germany
-----------------------------------------------
VB-FAQ: http://home.sol.no/jansh/vb/default.htm
NG-tips: http://www.rat.de/metty/vbnews



Sun, 10 Oct 1999 03:00:00 GMT  
 Textbox, Enable-Property, Graystyle

Quote:


> 13:53:22 GMT):

> >I set the Enable-property of a control (i.e. a Textbox) to False. Now I'd
> >like the foreground-color to stay black instead of gray. Is this possible
> >and how ???

> You lucky one: There's a bug in VB that allows you to do so:
> Just set the textbox's Multiline-property to true while it's
> disabled and there you go.

Brilliant tip!  Have you got any more similar ones?

Stu



Fri, 22 Oct 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Enabled property of textbox.

2. TextBox Enabled property

3. enabled property of textbox control

4. Change mouse icon when textbox enabled = false

5. Enabling/Disabling textboxes in Validate Event

6. Enable text in TextBox

7. Help-- question re textbox enabled=false

8. TextBox forecolor/enable

9. Enable=False without dimming text in textbox

10. textbox enabling: single line printing

11. Textbox enable locked

12. Enable Cut and Paste on Textbox

 

 
Powered by phpBB® Forum Software