[futurebasic] Common items in a tab control

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2003 : Group Archive : Group : All Groups

From: <bernie.w@...>
Date: Mon, 13 Oct 2003 14:29:35 +0000
Hi All,

I have a tab control with two tabs and some objects are common to both tabs. There’s a user pane for each tab, for the objects that change (_pane1 & _pane2) and just one extra pane for the common objects (_pane3). All three panes are embedded in the tab control and all objects are embedded in their panes.

When a tab is clicked, the following function is called:

Local fn HandleTabs(cRef and ControlRef)
Dim as rect r
Dim as long selectedPane

SelectedPane = button(cRef)

Button -_pane1
Button -_pane2

Select selectedPane
Case 1 : button _pane1
Case 2 : button _pane2
End select

Fn FBGetControlRect(button&(_pane3),r)
Button _pane3,,,@r
End fn

On switching the tabs, my common pane vanishes and in order to make it visible again, I have to do a button _pane3. However, unless I also specify its rect, it doesn’t re-appear.

Am I tackling the above correctly?


P.S. Excuse any typos as I’m having to re-type and send this from a PC   ;-(

Email provided by http://www.ntlhome.com/