TextBox
BlitzPlus Forums/BlitzPlus Beginners Area/TextBox| 
 | ||
| Think you guys are gonna get sick of me! How do I create a TextBox and save the Inputed data as a string? Like in a windows form! | 
| 
 | ||
| I *think* Blitzplus and Blitzmax/MaxGUI are more or less the same, so something like this (make sure debug is enabled so you can see the output): win = CreateWindow("test",50,50,200,120)
txt = CreateTextField(5,5,80,24,win)
SetGadgetText txt,"Hello"
btn = CreateButton("Click me",90,5,80,24,win)
Repeat
	WaitEvent()
	Select EventID()
		Case EVENT_WINDOWCLOSE
			End
		Case EVENT_GADGETACTION
			Select EventSource()
				Case btn
					DebugLog TextFieldText(txt)
			End Select
	End Select
Forever | 
| 
 | ||
| Thanx for the fast reply, This we give me something to chew over for a few hours! | 
| 
 | ||
| NO, I can't figure it out! :/ I think I must have asked the question wrong. ====================================== An Empty text box that can except user input and then the input saved as a string! Is that a more procise question. | 
| 
 | ||
| Actually, although I've never used B+, Gfk's code should work; just replace: DebugLog TextFieldText(txt)With something like: MyString$ = TextFieldText(txt) | 
| 
 | ||
| Thankyou ADAM Now that makes sence to my small addled brain! | 
| 
 | ||
| Hey, don't sweat it; I think all techie's brains are a little addled, which is why we're so great! |