Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

multiline textbox -- stuck in numeric mode

7 views
Skip to first unread message

rpa...@gmail.com

unread,
Sep 19, 2006, 1:46:32 PM9/19/06
to
I've got a multine textbox, and for some reason, when I first give it
focus, its stuck in numeric mode

txtBox = new TextBox();
txtBox.Multiline = true;
txtBox.Size = new Size(200, 100);
txtBox.WordWrap = true;

When I give the txtBox focus, I also call the OpenNetCf's inputmode
OpenNETCF.WindowsCE.Forms.InputModeEditor.SetInputMode
(txtBox,OpenNETCF.WindowsCE.Forms.InputMode.AlphaT9);

but that doesn't seem to change the input mode from numeric in the
textbox

Now when I hit the right key (or enter key), the textbox goes to full
screen, and I can modify the input mode in there, and then when I hit
done to come back to my screen, the textbox's mode is now whatever the
last full screen mode was.

The question is why can't I seem to be able to modify the textbox's
mode when its not in full screen?


This is the OpenNetCF code in case anyone is wondering
control.Capture = true;
IntPtr hwnd = Win32Window.GetWindow(Win32Window.GetCapture(),
GW.CHILD);
control.Capture = false;
//send message
IntPtr result = Win32Window.SendMessage(hwnd, msg, IntPtr.Zero,
(int)mode);
(and I'm getting a result = 1, which should mean success)

rpa...@gmail.com

unread,
Sep 19, 2006, 4:15:07 PM9/19/06
to
Update:
The issue is actually occuring with single-line textbox's as well,
which is a problem because I can't get a full-screen edit on the single
line textbox.

I also created a simple test application (blank form with a multiline
text box on it), using the same exact lines that I'm using in my real
app code.

And on this test application, the textbox works fine. When the textbox
has focus, the T9 key adjusts the input mode.

Whereas in my application, while the textbox has focus, pressing T9
does nothing.

Any idea on what could be messing up my application (since I know its
not the phone, or a cf bug)?
I'm running on a 2125 smartphone with CF1.1 btw if that matters

rpa...@gmail.com

unread,
Sep 19, 2006, 6:20:15 PM9/19/06
to
Another Update

I coded up the right menu so everytime there's a right menu press, it
toggles the input mode state (cycles thru the modes, abc, t9, numeric).

Pressing the right menu has no effect when the textbox first gets
focus.

However, once I go into full screen text box edit mode, then back to
non-full screen,
pressing the right menu button has an effect.

So something is masking is the effect of setting the input mode, but
once I go into full screen, that something is no longer masking the
input mode setting. Any ideas as to what that something may be?

rpa...@gmail.com

unread,
Sep 19, 2006, 6:35:19 PM9/19/06
to
After 6+ hours of mindless coding, I figured out the issue.
It has something to do with repainting/refreshing the textbox. Its not
only occuring in full-screen edit, but also if I just go back to the
home screen then bring my app to the front again, I can change the
input mode. So all I have to do is figure out how to get the screen to
refresh itself immediately.
0 new messages