| Using Form Builder
GoDB Development Studio comes with a built-in form builder to Create / Modify
forms in a GUI environment. GoDB (and the GStudio) supports many UI
widgets that can be used in the forms.
A quick summary of the widgets
 |
Select |
| Text Box |
| Hidden |
| Radio |
| Button |
| Date |
| Polyline |
| Signature |
| Calculator Box |
 |
Label |
| Password |
| Multi Line |
| Lut |
| Submit Button |
| Divider |
| Grid |
| Script |
| Frame Toolbox |
 |
Link |
| Read Only |
| Check Box |
| Cancel Button |
| Image |
| Popup Box |
| Embedded Grid |
| Title Text |
For the calculator application

- Create a New project by the name Operators.
- Open the home.txt file.
- Select two LABELS, and change value property to Enter number 1 and
Enter number 2respectively
.
- Select two TEXT BOXES and change the Value to 0.

Change the NAME property of the TEXT BOXES in the
property window to fNum1 and fNum2 respectively.
To ensure that the user enters only numeric values and does not leave the text
box empty the VALIDATE property can be set in the Properties Window"
How do I access the value in Form field variables in GBasic
programs?
Preced # to the form field variables NAME property to get access the value in GBasic programs in .bas files.
Example: Print the values of the text fields
Print #Fnum1
result=#fnum1+#fnum2 'result is local variable so no need to preced it with a #

Select five BUTTONS with values + , - , X , / and
Result.
Change the Name property of + BUTTON to Add, - to Subt, X to Multiply, / to
Divide and Result button to Result.
Now that the form is ready. Lets create the .bas file by creating the add_click
, subt_click etc subroutines by right clicking on the button form fields
selecting the script wizards and selecting OnClick option. The first time you do
this a dialog box appears, asking you if you wish to create a new bas file.
Select ok. Notice that a new .bas gets created with the same primary name as the
.txt file. This file contains all the subroutines you will create.
<blockquote>
flag=0 'if the user selects + button then flag =1, if - then flag= 2,
'if he clicks X then flag =3 and / then flag=4
sub add_click
Flag=1
endsub
sub subt_click
Flag=2
endsub
sub multiply_click
Flag=3
endsub
sub divide_click
Flag=4
endsub
</blockquote>

<blockquote>
sub Result_Click
if flag=0 then
MsgBox "Please click on an operator"
elseif flag=1 then
print #Fnum1 + #fnum2
elseif flag=2 then
if #Fnum1 > #Fnum2 then
print #Fnum1 - #fnum2
elseif #Fnum1 < #Fnum2 then
print #Fnum2 - #Fnum1
else
print "0"
endif
elseif flag=3 then
print #Fnum1 * #fnum2
elseif flag=4 then
print #Fnum1 / #fnum2
endif
endsub 'GBasic supports endsub and end sub
</blockquote>
Build and execute the project to see the results

|
Hi ,
I have basic dought regarding the GoDB. why this GoDB is used (in which situation) . i think it is used in developing GUI for touch screen devices.
can we use GODB for developing GUI for series60 Devices ? If yes kindly let me know... Since iam developing an application which is developed on GoDB and i want the same application to be developed in series60. since GoDB had different form all the forms are not available in series60.
is there any way to use GoDB for series60 GUI development.....
help needed .......
Hi Godb support nokia 60 series,but i dont know howfar its flexible for nokia
as u know nokia lacks touch screen
even i used some other Rapid tool like Godb for Nokia 9500
but none of them have flexibility like c++
the tool I used is costly
Can i know for what's the purpose of ur application ?
based on that u can select ur tool
3 -4 rapid tools are available for symbian
regards bhanu
Hi,
Is there any way of doing this on CodeWarrior. I have been looking for this exact thing for a month now and have searched it over everywhere, but couldnt find anything related to this.
Or atleast just let me know how to make even a simple text box to be displayed on the screen in the Emulator. I 'd highly appreciate a help of any kind over this matter.
Thanks
SM.