Mousedown, Click events - Pocket PC
The MouseDown and Click events don't work!?
I am using Service Pack 2, Pocket PC.
First I manually initialized a TextBox Control -
txBox = new TextBox();
txBox.Bounds = this.ClientRectangle;
txBox.Multiline = true;
txBox.ScrollBars = ScrollBars.Vertical;
txBox.Text = "";
txBox.WordWrap = true;
txBox.ReadOnly = true;
txBox.MouseDown += new MouseEventHandler(txBox_MouseDown);
this.Controls.Add(txBox);
In another function I fill the txBox with some info, and show it
txBox.Text = "woo hoo!";
txBox.Visible = true;
txBox.BringToFront();
txBox.Focus();
The following is useless in both the emulator and on an actual device.
private void txBox_MouseDown(object sender, MouseEventArgs e)
{ //Close the Help Box
txBox.Visible = false;
}
However it does allow you to select the text in the textbox. So why wouldn't it fire a MouseDown event? Also I tried the Click event, and the MouseMove events. I tried it without readonly, yet it still did not fire! HELP!