[Gambas-user] inputbox
Hans-Martin Bundeshund
bundeshund at ...467...
Fri Jul 16 21:28:01 CEST 2004
Hi Eddy!
Am Freitag, 16. Juli 2004 20:59 schrieb Eddy Van de Pol:
> Sorry if it's a dumb question, but my kwowledge of programming is very
> low, but a few years ago I learned a litle bit of visual basic at the
> evening school and found it fun to make some litle programs one my own.
> Forget it a bit because I'm only using gentoolinux now; So I was happy to
> found out that with gambas I can experiment a bit further now.
> but I'm struggling a bit (gambas is not a clone of visual basic and as I
> said my knomwledge is limited)
Welcome to gambas. Never saw such a easy to use and powerful language as
gambas is. You will see.
> Major problem for me now is to get inputbox working, I searched a bit and
> found something about "use: Util" but I can't get it to work, So I tried
> to create a new form and use this as inputbox, but now I have trouble to
> get data from one form to te other, I found some examples but they didn't
> work. I did something with Clipboard.Copy and Clipboard.Paste but that
> seems a bad solution.
> can anyone give me a hint how to get function inputbox towork properly
> under gambas?
I hope I understand right. Eg. if you have two textboxes called 'textbox1' and
'textbox2', the user can insert text into 'textbox1' while 'textbox2' is
read-only (you can set this in the property-box: ReadOnly = TRUE) and you
have a button called 'button1'. When the user inserted the text and pressed
the butten called 'button1', you can handle this with
PUBLIC SUB button1_KeyPress()
textbox2.Text = textbox1.Text 'copy text from textbox1 to textbox2
ME.Refresh 'refresh the form
END
If you press the right-mouse on the button1 in the form-editor you can choose
the KeyPress-event in the event-menu, or just type it in the code-editor.
> thanks a lot from a real beginner
HTH
HM
More information about the User
mailing list