[Gambas-user] basics basics

Christian DaGeek247 Stephens imageek247 at ...626...
Fri May 20 16:20:11 CEST 2011


*"*I used to do some programing on spectrum and amiga and now want to write
some simple apps with gambas.My problem is i am tottaly baffled by this new
type of programing.  The documentation and examples do not explain the very
basics well enough for me at all.
For example a simple program has a window with a Valuebox, a button and a
slider.   How do i program it so when i press the button the value of the
slider is displayed in the valuebox? If anyone can carefull explain how, not
just write the code, it would really help me get going!
Thanks*"
Its rather easy to do this. When you are in the gambas IDE, double click the
command button. The coding screen shows up, and you can type in the code for
the command button. put in
*valuebox.value = slider1.value
*After that, every time you change the value of the slider and click the
command button it shows the value of the slider in the valuebox. if you
wanted it to work in reverse, you would simply reverse the code;
*slider1.value = valuebox1.value
*You could also set it so that the slider always has the value of the
valuebox and vise versa. right click on the slider and mouse over onto the
"events" button. then click on "Change" (er something like that, im not on
gambas right now, this is all from my head.)* *simple add the code to the
screen that shows up;
*valuebox1.value = slider1.value
*then repeat the process for the value box, and add this code;
*slider1.value = valuebox1.value
*press "F5" to watch it go. :)*

-- 
*Live Chat room!*
*http://dglivechat.tk
My Website:
dageek247.tk*
*Calvin: *BU-URP!
*Mom:* Good heavens, Calvin! What do we say after that?
*Calvin:* "Must be a barge coming through!"
*Mom:* WHAT Do you say?!
*Calvin: *That sure tasted better going down than coming up!
*Mom: *Three strikes and you're history kiddo.
*Calvin: *excuse me.



More information about the User mailing list