MaxGui TextArea problem

BlitzMax Forums/BlitzMax Programming/MaxGui TextArea problem

ozak(Posted 2005) [#1]
How do I attach it to my main window, so it resizes when the main window resizes? Could'nt seem to find anything in the docs :)


Sarge(Posted 2005) [#2]
Your looking for SetGadgetLayout, use SetGadgetLayout( textbox, 1, 1, 1, 1 ) so it acts like notepad.

Example,
Local window:TGadget

window=CreateWindow("My Window",40,40,320,240)
Local TextBox:TGadget = CreateTextArea( 0, 5, ClientWidth( window ), ClientHeight( window )-4, window )
SetGadgetLayout( TextBox, 1, 1, 1, 1 )

While True
	
	WaitEvent()

	Select EventID()
		Case EVENT_WINDOWCLOSE
			End
	End Select
	
Wend



ozak(Posted 2005) [#3]
Ahh. Neato. Thanks :)