[Gambas-user] Programming beginner: first program won't run?
jbskaggs
jbskaggs at ...1871...
Sun Apr 19 05:36:24 CEST 2009
Okay two other things then:
make sure your control names match the names in your code (ie label1 is
actually named label1 on the form etc)
two make sure you dont have the controls set to visible.false on the form.
try this code:
public sub form_open()
label1.visible=true
button1.visible=true
textbox1.visible=true
textbox1.readonly=false
textbox1.text="Hello World!"
end
public sub button1_click()
label1.text = Textbox1.text
end
The first section makes sure your controls are visible and that textbox is
not set to readonly (although you shouldn't have to do this as by default
controls are visible and readonly = false), and sets the text of textbox1 to
hello world. You can type whatever you want in the textbox.
The second section assigns any text in the textbox1 to the label1.
Tell me if this runs for you?
JB Skaggs
phohammer wrote:
>
> Yep, I created the form just as the tutorial said (in my first post):
>
> http://www.nabble.com/file/p23118993/form.png
>
>
> jbskaggs wrote:
>>
>> Hi I hope this doesn't seem too basic- but did you create your form and
>> draw the textbox1, label1, and button1?
>>
>> JB SKaggs
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119189.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list