How can one reset a tab panel?
Posted: Sun Aug 22, 2021 2:54 am
Serendipity Editors is a two-card stack, and I am using a tab panel to navigate between the Image Editor and the Icon Editor. Each tab contains the name of one of the cards, so
on menuPick theCardName
go to card theCardName
end menuPick
does just fine....until I close the stack from the second card. The next time the stack is opened the tab is set as it was on the card that was visible when the stack was closed. I've tried the same technique with a grouped tab panel on a simple three-card stack with cards named "Tab 1", "Tab 2", & "Tab 3" with the same result.
I realize the tab panel is designed for a dialog box, not for navigation; but I like the effect on a stack with a small number of cards. So I'm looking for a solution or a workaround. I tried putting a closeStackRequest handler in the script of the second card that clicks at the appropriate tab, but no go.
When I follow the process in the Message Watcher I see:
focusIn
mouseDown
cREVGetsUpdate
menuPick
cREVGetsUpdate
cREVTable
cREVGeneral
mouseUp
mouseLeave
I'm guessing the tab switch is handled in one of the cREV messages. Sending a menuPick message does not change the tab, and while I can see the tabs in the text of the panel. I can't identify a property that determines which tab is hilited.
Any thoughts/suggestions would be appreciated.
on menuPick theCardName
go to card theCardName
end menuPick
does just fine....until I close the stack from the second card. The next time the stack is opened the tab is set as it was on the card that was visible when the stack was closed. I've tried the same technique with a grouped tab panel on a simple three-card stack with cards named "Tab 1", "Tab 2", & "Tab 3" with the same result.
I realize the tab panel is designed for a dialog box, not for navigation; but I like the effect on a stack with a small number of cards. So I'm looking for a solution or a workaround. I tried putting a closeStackRequest handler in the script of the second card that clicks at the appropriate tab, but no go.
When I follow the process in the Message Watcher I see:
focusIn
mouseDown
cREVGetsUpdate
menuPick
cREVGetsUpdate
cREVTable
cREVGeneral
mouseUp
mouseLeave
I'm guessing the tab switch is handled in one of the cREV messages. Sending a menuPick message does not change the tab, and while I can see the tabs in the text of the panel. I can't identify a property that determines which tab is hilited.
Any thoughts/suggestions would be appreciated.