locked
Faint Text Box Characters

    Question

  • I'm working with Visual Basic 2008 Express. I've got several Text Boxes on a form that display variables calculated by the app. To make sure that users can't type anything into these I've set their read-only properties to True. The characters shown in these boxes end up appearing very faint grey. I don't know how to make the characters more pronounced and easy to read. Should I try changing their fore colors? Or is that the wrong approach?

    Many thanks,

    Brian
    Thursday, April 23, 2009 1:11 PM

Answers

  • Hi BDL,

    just change the BackColor of the textbox to "Window"
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    • Marked as answer by BDL Friday, April 24, 2009 10:38 AM
    Thursday, April 23, 2009 1:21 PM
  • BDL,

    You can click on your Textboxes and go to the properties section in VB and choose a different "BackColor". Try changing it from "Control" to the color of your choice.

    or

    You can do it in the code like this:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            TextBox1.ReadOnly = True
            TextBox1.BackColor = Color.White
    End Sub
    • Marked as answer by BDL Friday, April 24, 2009 10:38 AM
    Thursday, April 23, 2009 1:30 PM
  • You can equally increase the font size by selecting the TextBox then go to Properties, chose FONT. Click on the "..." next to it and then chose a larger font size.
    Only performance counts!
    • Marked as answer by BDL Friday, April 24, 2009 10:39 AM
    Thursday, April 23, 2009 2:08 PM

All replies

  • Hi BDL,

    just change the BackColor of the textbox to "Window"
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    • Marked as answer by BDL Friday, April 24, 2009 10:38 AM
    Thursday, April 23, 2009 1:21 PM
  • BDL,

    You can click on your Textboxes and go to the properties section in VB and choose a different "BackColor". Try changing it from "Control" to the color of your choice.

    or

    You can do it in the code like this:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            TextBox1.ReadOnly = True
            TextBox1.BackColor = Color.White
    End Sub
    • Marked as answer by BDL Friday, April 24, 2009 10:38 AM
    Thursday, April 23, 2009 1:30 PM
  • You can equally increase the font size by selecting the TextBox then go to Properties, chose FONT. Click on the "..." next to it and then chose a larger font size.
    Only performance counts!
    • Marked as answer by BDL Friday, April 24, 2009 10:39 AM
    Thursday, April 23, 2009 2:08 PM
  • Another suggestion is, you can handle the keypress-event from those Textboxes and set e.handled=true
    Friday, April 24, 2009 8:17 AM