0

While using the 'pointer tool' I have placed a tab panel on a card. Then I added a scrolling field to the first tab.

When I switch to the 'browse tool' the field is visible on all the tabs including content I added.

I would like to have a tab panel with a scrolling field on each with different content. How do I do that?

z--
  • 2,186
  • 17
  • 33
  • Page 143 of the book "Programming LiveCode for the Real Beginner" ;-) – Mark Jun 20 '13 at 07:58
  • The answer of David Williams below captures concisely what I need as I am not a 'real beginner', I have used HyperTalk intensively many years ago. I need explanations for the 'conceptual differences' alongside with some example code and ideas about coding patterns. In addition this question addresses an issue I would have expected to be found in the User's Guide. A search for 'tab panel' in the PDF gives 'No matches were found'. – z-- Jun 20 '13 at 12:10

1 Answers1

2

Generally, the tab panel is used to show and hide groups using it's mouseUp handler. You look at the selectedText property of the tab panel to see which tab is selected, and act appropriately. You might do something like the following in the mouseUp handler of the tab panel:

on mouseUp
  hide group "tab group 1"
  hide group "tab group 2"
  hide group "tab group 3"
  show group (the selectedText of me)
end mouseUp

There is also a nice tutorial on using a tab group on lessons.runrev.com:

http://lessons.runrev.com/s/lessons/m/4071/l/7574-using-tab-buttons

David Williams
  • 436
  • 2
  • 2