Results 1 to 4 of 4

Thread: vb6 text boxes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    208

    vb6 text boxes

    I have a form with text boxes on it.
    for the text box if text.enabled = flase then the value in the text box
    turns to very light gray (sometimes not readable) Hence Can this color be changed ??

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: vb6 text boxes

    Quote Originally Posted by Micky
    I have a form with text boxes on it.
    for the text box if text.enabled = flase then the value in the text box
    turns to very light gray (sometimes not readable) Hence Can this color be changed ??
    Not if you disable it, no. That is the standard DISABLED look of all VB controls.

    If you want to "fake" the disabled feature, then you can set its .Locked property to True. Prior to doing that you can set the forecolor to whatever you want, and then when/if you unlock it, set the forecolor back to vbBlack.

  3. #3
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313

    Re: vb6 text boxes

    Not sure if you can mess with the colours when disabling controls.
    However, you might be able to get the effect you want by using
    VB Code:
    1. Text1.Locked = True
    2.     Text1.BackColor = vbScrollBars
    <edit>
    D'oh. You win this time Hack
    </edit>

  4. #4
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: vb6 text boxes

    if you are having so nobody can type into it consider a label, you could make it look like a textbox or you could put it in a container, something like a frame and disable the frame.

    casey.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width