P
Perry van Kuppeveld
Hi,
When running this code, it's not possible to select the text using the mouse
in the textbox. What's wrong with it?
(This is just a code snippet. I can't use a MDI frame).
Regards,
Perry
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsTestApplication
{
public class MainClass
{
public class FormChild : Form
{
public FormChild()
{
TextBox tb = new TextBox();
tb.Location = new Point(5,25);
tb.Width = 240;
tb.Text = "Try to select a part of this text using the mouse";
this.Controls.Add(tb);
}
}
public class FormMain : Form
{
public FormMain()
{
FormChild f = new FormChild();
f.Location = new Point(10,10);
f.Size = new Size(250,150);
f.TopLevel = false;
this.Controls.Add(f);
f.Show();
}
}
[STAThread]
static void Main()
{
Application.Run(new FormMain());
}
}
}
When running this code, it's not possible to select the text using the mouse
in the textbox. What's wrong with it?
(This is just a code snippet. I can't use a MDI frame).
Regards,
Perry
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsTestApplication
{
public class MainClass
{
public class FormChild : Form
{
public FormChild()
{
TextBox tb = new TextBox();
tb.Location = new Point(5,25);
tb.Width = 240;
tb.Text = "Try to select a part of this text using the mouse";
this.Controls.Add(tb);
}
}
public class FormMain : Form
{
public FormMain()
{
FormChild f = new FormChild();
f.Location = new Point(10,10);
f.Size = new Size(250,150);
f.TopLevel = false;
this.Controls.Add(f);
f.Show();
}
}
[STAThread]
static void Main()
{
Application.Run(new FormMain());
}
}
}