SetGadgetGroup

BlitzMax Forums/MaxGUI Module/SetGadgetGroup

JoshK(Posted 2010) [#1]
Not sure if this is 100% safe or not, but it seems to work:
Function SetGadgetGroup(gadget:TGadget,group:TGadget)
	gadget.parent.kids.remove(gadget)
	gadget.parent=group
	gadget.parent.kids.addlast(gadget)
	SetParent(QueryGadget(gadget,QUERY_HWND),QueryGadget(group,QUERY_HWND_CLIENT))
	SetGadgetShape(group,GadgetX(group),GadgetY(group),GadgetWidth(group),GadgetHeight(group))
EndFunction



jondecker76(Posted 2010) [#2]
very nice! I think I may use this myself


jondecker76(Posted 2010) [#3]
I get an error:
Identifier "SetParent" not found

trying to test it on a Linux install...


JoshK(Posted 2010) [#4]
I forgot you need this too:

Extern "win32"
Function SetParent(a:int,b:int)
EndExtern

Windows only.


jondecker76(Posted 2010) [#5]
aah ok :(

I only run Linux, so I guess this will be of no real use to me


Ghost Dancer(Posted 2010) [#6]
This will certainly be useful. Thanks.