Carbide.c++ Tutorial 2 - Getting Input from user
This code example shows how to use the Carbide.c++ designer to create a single line data query input dialog. The example presents the user with an input dialog: once the user enters text and selects the OK softkey the entered text is displayed to the user.
Article Metadata
Code Example
Article
The input dialog is in the Carbide.c++ designers's Notes and Dialogs section.
Contents |
Prerequisite
See this tutorial first in order to understand basics of creating and running an application: Helloworld tutorial
Step 1 - Start a new project
- Start with a new project using Carbide.c++ IDE.
- Call it dialogs ( or whatever you like).
Once you are done with all basic steps you will see this window.
Step 2 - Add Single Line Data Query
Now add the Single Line Data Query input dialog to the form.
When selected from control pane, it would appear as below.
Step 3 - Delete the default
Now delete the default text appearing in the text area of the dialog.
Step 4 - Add event handler
- Add one menu item in the options menu.
- Refer to the above mentioned hello-world tutorial.
- Call this menu item as "Get Input".
- Now add an event handler to the menu item.
In the event handler the add the code for
Step 5 - Generated Code
Notice that the IDE generated code for the function to show the data query dialog. Remember not to tamper with the code between the tags called "generated code" this may stop auto generation of code.
Step 6 - Executing the application
Now we are done with the code and design part. Run the application to text it in emulator and following should be the output.
Step 7 - Changing the properties
The properties of the dialog can be altered visually in GUI designer. Right click the dialog and then select "Show properties view" option.
Conclusion
This way we can develop the GUI based application using Carbide.C++ very quickly. Once the basic idea of using dialogs with the IDE is clear, one can go for other dialogs in the application.


09 Sep
2009
this article is well explained and shows step by step image based explanation to be followed. But if tit had coupled and showed the output in a label control, then might be a great article.
The article well-explains the step by step procedure to create an application with UID with gets input from user. The article explains the one of many ways to get input from the user i.e. Single Line Data query input dialog. The article also contains image implementation to simplyfy the description. The article is the 2nd series of Carbide.c++ tutorial. You are supposed to refer the first serie i.e. Carbide.c++ Tutorial 1 - Helloworld to get an idea about creating a new project with UID and runing it.
The article simply takes input from user using UID and displays on the screen. Beginners will find it very useful for their further progress.