I've read the posts up above and clearly the tab issue is confusing people, so I have produced another update which adds a couple of new commands to deal with this:
attachGadget(target, tab, attach)
This attaches a gadget to a particular page on a tab gadget. Once a gadget is attached, it will be shown automatically when that page is selected, and hidden when other pages are selected.
target - The tab gadget handle
tab - The index of the tab which the gadget should be attached to
attach - The handle of the gadget to attach
Gadgets can be attached to multiple pages on the same tab gadget. No other association is created (ie. if you delete a tab gadget, it won't delete associated gadgets, unless of course the associated gadgets are children of the tab)
detatchGadget(target, tab, detatch)
Opposite of the above command, removes the association between the tab gadget and the attached gadget.
Example:
The "Hello" button will only show when the first page is selected, the edit box will only show when the second page is selected. Clicking on the hello button detatches it, so that it is always shown.
t=createTabs(10,10,300,300,0)
u=createButton(20,20,75,25,"Hello",0,t)
v=createEdit(20,60,75,25,0,t)
addTab t,"Tab One"
addTab t,"Tab Two"
attachGadget t,0,u
attachGadget t,1,v
do
getEvent
if (eventSource()=u) and (eventType()=MOUSE_CLICK)
detatchGadget t,0,u
endif
loop
Download:
Login to the Blue2 website, then click this link:
http://www.robertknight.me.uk/blue2/site/?view=download&file=downloads/gui2_14_06_05_B.zip
Note: If you delete a tab or change its caption, the associations are not currently affected.
BlueGUI Windows Plugin