469,962 Members | 2,281 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

textbox control focus and input

Hello everybody,
I Have a piece of code for a Pocket PC that has a
disabled and hidden textbox control at startup. It is
enabled and set visible programatically. The cursor is
captured calling the focus method.
The problem is: the focus is lost almost inmediately. I
can't type in anything.

See the code below.

Any ideas?

Thank you,

Carlos Lozano

The code is like this:

SetVisible(bool toggle)
if (toggle)
bool lfocus = false;
tName.Enabled = true;
tName.Visible = true;
tName.Show(); // The control is shown at this point
lfocus = tName.Focus();
/* I found lfocus is true when debugging. Meaning
it got the focus, but seems it lost focus
tName.Visible = false;
tName.Enabled = false;
tName.Hide(); // The control is hidden again
Nov 15 '05 #1
0 1313

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Albinas | last post: by
3 posts views Thread by Hrvoje Voda | last post: by
2 posts views Thread by Jesper | last post: by
8 posts views Thread by Shawn | last post: by
8 posts views Thread by nil | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.