Getting messed up window from MaxGui Tut. example
BlitzMax Forums/BlitzMax Beginners Area/Getting messed up window from MaxGui Tut. example
| ||
As you can see, if everything posts correctly,the little checkbox example window produced by this example tut. is messed up. Plus if I resize the window it stretches the position of the check boxes all over the place. I don't understand why. Edit: ok don't know how to post an image or code block....here's link for image. http://s1207.beta.photobucket.com/user/Galdy/media/guiwindow_zps67247ac0.png.html?sort=3&o=0#/user/Galdy/media/guiwindow_zps67247ac0.png.html?sort=3&o=0&_suid=135637738144809557192045535475 [Code] SuperStrict Import MaxGUI.Drivers Local MyWindow:TGadget = CreateWindow("Checkbox Button Example", 200, 200, 320, 240) Local Label0:TGadget = CreateLabel("Select the Product you wish to buy", 80, 10, 300, 20, MyWindow) Local BlitzMax:TGadget=CreateButton("Blitzmax $80",120,40,100,20, MyWindow,BUTTON_CHECKBOX) Local Mgui:TGadget = CreateButton("MaxGUI $25", 120, 60, 100, 20, MyWindow, BUTTON_CHECKBOX) Local BlitzPlus:TGadget=CreateButton("I am a registered Blitzplus owner",80,80,200,20, MyWindow, BUTTON_CHECKBOX) Local Total:TGadget=CreateLabel("Total in Basket $",60,110,300,20, MyWindow) Local Amount:Int Repeat WaitEvent() Amount=0 Select EventID() Case EVENT_WINDOWCLOSE End End Select If ButtonState(BlitzMax)=True Amount=80 If ButtonState(Mgui) = True If ButtonState(BlitzPlus)=False Amount=Amount+25 EndIf SetGadgetText Total,"Total in Basket $"+Amount+".00" Forever [/code] Last edited 2012 Last edited 2012 |
| ||
is it that, what you are looking for?Local BlitzMax:TGadget=CreateButton("Blitzmax $80",120,40,100,20, MyWindow,BUTTON_CHECKBOX) SetGadgetLayout BlitzMax , 1,1,0,0 |
| ||
I'm trying to understand why the code above is not behaving as the tutorial says it will. It's from the "The MaxGUI Beginner Tutorial Series" part 3. |
| ||
The gadgets do what they are told to do. But you have to tell them all how to react on resizing. If you want to keep them on the left side , always use 1,0,1,0. Normaly you would pack buttons in a frame and this frame get 1,0,1,0. and normaly such parameter setting windows dont get the prpoerty to be sized!!! Last edited 2012 |
| ||
Ok. The SetGadgetLayout was what I was looking for. I needed SetGadgetLayout MyGadget, 1,1,1,0 to keep them stationary. Thanks for the help. |