[MaxGUI] whats wrong

BlitzMax Forums/BlitzMax Beginners Area/[MaxGUI] whats wrong

Kernle 32DLL_2(Posted 2006) [#1]
local n:Tgadget
n.name="test"

whats wrong


TomToad(Posted 2006) [#2]
First of all, you should be setting the gadget stuff through the supplied functions unless you know exactly what you're doing. More often than not, when one parameter is changed, others need to be changed also.

Second, it's not working because you're just creating a lable for a TGadget, but not creating an actual instance of TGadget. For your example, you should use:
Local n:Tgadget = New TGadget
But it would even be better to use MaxGUI's own functions.
Local n:TGadget = Createwhatevergadget(Gadget parameters)


assari(Posted 2006) [#3]
To learn more about MaxGUI, go through the beginner's tutorial


The r0nin(Posted 2006) [#4]
I agree! The beginner's tutorial is VERY helpful. It's well worth the time to read through it...


Grisu(Posted 2006) [#5]
+1 :)