[Gambas-user] Inputbox
Andreas Fröhlke
afroehlke at ...784...
Thu Feb 9 11:58:46 CET 2006
Ignatius Syofian schrieb:
> Hi,
>
> If i want to ask user to input some value in messagebox like
>
> How many card you want ?
>
> then user can type a value i.e 5 (means 5 card)
>
> I means something like inputbox message.
>
> How can i do something like this in gambas?
>
Hello,
I think theres nothing like the VB InputBox in Gambas. You must make
your own. Use a simple Form(With: A TextBox, and two buttons), with a
Public Function Like "GetInput"
in this form:
#############################################################
'Deklarations
private bOK as boolean
Public Function GetInput() as string
'This function you must Call
me.ShowModal
if bOK = true then
return me.textbox1.text
end if
end
public sub command1_click()
'Ok-Click
bok = true
me.close
end
public sub command2_click()
'Cancel-Click
bok = false
me.close
end
#############################################################
Example for calling this form:
#############################################################
private sub Test()
dim f as form1
msgbox(f.GetInput)
end
#############################################################
--
Mit freundlichen Grüßen aus Onsabrück.
Andreas Fröhlke
Anwendungsentwickler
KiKxxl GmbH
Mindener Str.127
49084 Osnabrück
Tel.: 0541 / 330 5 445
Fax: 0541 / 330 5 100
Mail: afroehlke at ...784...
WWW: http://www.kikxxl.de
More information about the User
mailing list