Contents |
In every application one of the basic requirements, in case of a GUI, is some method to take input from user. There are several options available to get the input from user. One of the simplest options is Single Line Data query input dialog. In Carbide.c++, in the pallet you can see a section called Notes and Dialogs. Here you can find this input dialog.
The example when executed presents the user with an input dialog. Once user has entered some text and hit the menu application shows the same text back.
See this tutorial first in order to understand basics of creating and running an application. Helloworld tutorial
1) Start with a new project using Carbide.c++ IDE. 2) Call it dialogs ( or whatever you like).
Once you are done with all basic steps you will see this window.
Now add the Single Line Data Query input dialog to the form.
When selected from control pane, it would appear as below.
Now delete the default text appearing in the text area of the dialog.
1) Add one menu item in the options menu.
Refer to the above mentioned hello-world tutorial.
2) Call this menu item as "Get Input".
3) Now add an event handler to the menu item.
In the event handler the add the code for
1. Show the dialog. 2. Read the text from dialog. 3. Show it back.
Just notice that the IDE generated code for the function to show the data query dialog.
Remember not to tamper the code between the tags called "generated code" this may stop auto generation of code.
Now we are done with the code and design part.
Run the application to text it in emulator and following should be the output.
The properties of the dialog can be altered visually in GUI designer.
Right click the dialog and then select "Show properties view" option.
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.
No related wiki articles found