Textbox question

  • Thread starter Thread starter Guest
  • Start date Start date
Hi CobraStrikes,

You could use a Label, set BackgroundColor to the same as a TextBox and use a Fixed3D border. This is probably the simplest.

You could also handle the Enter event of the TextBox and pass the focus on to the next control in the tab order

private void textBox1_Enter(object sender, System.EventArgs e)
{
Control c = textBox1;

// find the next control in the tab order until
// we encounter one that can be selected
do
c = this.GetNextControl(c, true);
while(!c.CanSelect && c != textBox1);

c.Focus();
}
 
WinForms? If so, set the textbox TabStop property to false. However, user
can always click on the Text box to set the focus. Or, set Enabled property
to False.

Is there a easy way to stop a textbox receiving focus ? if so how ?
 
Back
Top