Help understanding tab panels

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Help understanding tab panels

Post by jalz » Tue May 08, 2012 11:05 pm

Hi all,

I've introduced the tab panel object on my layout. I've currently got 4 tabs for that object. Now reading up on tab panels they work similar to the menupick object(although I have not used this yet). Ive a found a tutorial which shows me using the case statement populate various bits of text on individual tabs. What I am hoping to achieve is to put a number if input fields unique to each tab. So I've dragged my 3 fields on the first tab, switched to the second tab and the fields for tab one are there. Reading another tutorial I can switch from one card to another so I can duplicate the card with tab 1, remove the input fields for this and apply new data entry fields for tab 2. This seems rather inefficient to me though as any card changes around the tabs would have to be made multiple times.

What is the best way I can utilise tab fields, with different input fields In various cards. Perhaps I can group the fields for tab 1 and make them invisible unless tab 1 is selected and do the same for tab2

Any advice would be great, just trying to get my head around this,

Thanks

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Help understanding tab panels

Post by mwieder » Tue May 08, 2012 11:54 pm

Perhaps I can group the fields for tab 1 and make them invisible unless tab 1 is selected and do the same for tab2
That's exactly what I do.

Code: Select all

on menuPick pChosen
  hide group 1 of me
  hide group 2 of me
  hide group 3 of me
  switch pChosen
    case "apples"
      show group 1 of me
      break
    case "oranges"
      show group 2 of me
      break
    case "kumquats"
      show group 3 of me
      break
  end switch
end menuPick

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: Help understanding tab panels

Post by jalz » Wed May 09, 2012 8:52 am

Thanks for pointing me in the right direction again, thought I should do that logically but couldn't
find any samples, only the ones that take you to different cards.

I'll see how I get on :)

Post Reply