home | |||
links |
|
||
developer's mag main page article part 1 part 2 part 3 part 4 part 5 part 6 part 7 part 8 |
7 - A Plethora of KeyboardsYou could also call the keyboard simply with the following line:GUI_EventLoop(new CLatin1Keyboard(99)); // display keyboardThis displays the lowercase keyboard at the bottom of the screen. The second parameter in the constructor is optional, and defaults to 69 - it is the Y coordinate of the keyboard top, and allows you to place the keyboard where you prefer. In our case, the message loop data and the edit control are at the bottom, so we've set our keyboard to the top by using a value of zero. In our code we've split up the keyboard creation and display so we could use the SetCurScreen() function, which takes in an index from zero through four and displays the specified keyboard:
When finished with the keyboard, the ENTER key sends the text to the parent. As earlier mentioned, focus determines where the text goes exactly. The sample program lets you try setting the focus to the edit field or the form, and displays the results of each. This is deliberately done to let you look at the results, but in production code you should always use SetFocus() to specify the text destination before launching the keyboard. Previous Section Next Section |
||
Copyright © 2001-2006 ebmDevMag.com - Legal Notice |