Possible decl windows as type
BlitzMax Forums/MaxGUI Module/Possible decl windows as type
| ||
hi there I wondering if it's possible to do this Type InfoWin Field Index:Int Field Caption:String End Type Global Window:InfoWin[30] Window[0]=CreateWindow("My Window",30,20,400,300,0) this code does't work. it's there a way to use variable with type in this case ? or maybe there another way to archive this thanks |
| ||
I don't really understand what you are trying to achieve. Do you want an array of windows? In which case, you could do something like:Global MyWindows:TGadget[30] MyWindows[0] = CreateWindow("My Window",30,20,400,300,Null)Or do you actually want to extend the TGadget type to hold more information about each gadget? If this is the case, you may want to consider extending TProxyGadget instead. Please clarify exactly what you mean. |
| ||
Sorry .... Yes I want to extend TGadget to hold getting more information about other gadgets. TProxyGadget ? humm it's in MaxGUI ? |
| ||
Yes I want to extend TGadget to hold getting more information about other gadgets. TProxyGadget ? humm it's in MaxGUI ? Yep - have a look in brl.mod/maxgui.mod/gadget.bmx. Basically, it's something Skidracer added to allow you to easily extend TGadget to create custom gadgets etc. Here's a quick demo: |
| ||
ah thanks a lot :) |