TextBox Border

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Is there any way to make the border of a text box invisible, or set the text
box so it doesn't have one, any code or help would be greatly appreciated.

Thanks
 
The only way is to place the TextBox inside a panel and set the panel to be
2 pixels smaller in width and height, with the textbox placed at -1,-1 this
then hides the border.

Peter
 
That works I suppose, but another question...how can I set the background
color of a read only text box to white. Right now it's gray cause it's read
only and I need it to be white, any way to change this, and if so, how?
 
Again a workaround is to not make the textbox readonly, but instead handle
the gotfocus event of the control and pass the focus to another control or
the parent form, this will make it impossible for the user to edit the text.

Peter
 
Several things...since I'm new to C# and the .NET platform in general I have
a few questions.

1. Why can't I select an event from a drop down for a control like I could
in VB 6?
2. Why is the object browser so difficult to use, unlike the one in VB 6?
I just can't seem to find anything I'm looking for, I'm not even sure it's
the same thing!
3. Since I can't do either of the above, I have no idea how to do the
GotFocus thing you talk about...even the help doesn't seem to provide a way
to do this. I tried to make my own function, i.e. txtInfo_GotFocus() and
then in the function I put frmInfo. and when I pressed the period key, only
three options came up in the intellisense! There has got to be an easier
method to do such simple coding. I thought when a new version of software
came out, i.e. Visual Studio .NET, things were supposed to be easier, but I
can see that's just not the case.
 
1. Why can't I select an event from a drop down for a control like I
could
in VB 6?

Aaron, if you are using VB.NET you can still select the events like you
could with VB6. If you are having problems let me know what you are trying
exactly...

If you are using C#, go to the properties window and select the lightning
bolt to show the event supported by the control. In Whidbey (the next
version out in 2005), this approach is also available to VB2005 (in addition
to the drop down method).

Cheers
Daniel
 
Back
Top