Jump to content
Server Maintenance This Week. ×

Show records in list view within tabs


This topic is 5386 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a database with one table containing a number of fields. This is related to a table in another database using a reference number field. I would like to display all of the records from the main table in list format in a tab, and then when I select a 2nd tab, have the related records from the other table displayed in that 2nd tab (also in list view with one row per record, with each row corresponding to the respective row in the first tab, as defined by the reference number field).

I tried doing this by putting the tabs themselves in the header of my layout, with the part containing the records (in the body of the tab panel) in the layout body. However, when I do this, it just displays all of the fields from both tables and from all tabs one on top of the other, and switching tabs has no effect on the displayed information.

I understand that this is probably happening because I'm not supposed to put the tabs in the header and the body of the tab panel separately in the body of the layout, but I couldn't find another way to do this...

Notably, if I bring the whole tab panel (including the tabs themselves and the entire body of the tab panel) down into the layout body and display as list, it shows me each item with all of the tab headings above it, repeated as many times as I have items (i.e. not just the record is repeated, but rather it is repeated within the tab panel - which is obviously not what I'm going for...). I would like to be able to just select a tab and have all of the records from the relevant table displayed in a list below it.

I've done quite a bit of searching and reading here and haven't found a solution to this, although I did find a few workarounds, such as creating buttons which link to different layouts. I COULD do this in this way, but that seems to defeat the purpose of the tabs, so I think there's probably just something I'm missing.

I would greatly appreciate if anyone could help me figure this out. Thanks!

Link to comment
Share on other sites

Whenever you use tabs to display fields and data, the fields must be enclosed totally within the boundary of the main tab panel box.

What you are in effect attempting to do is use the tab panel as a navigation object which is not its primary function. When you see what appears to be tabs on list views in other developers' solutions you are actually seeing buttons with navigation scripts that have been created to give the illusion of tabs.

What the 'illusion tabs' are doing is simply switching between layouts.

Alternatively, you could insert a portal and place that within the bounds of the tab panel. For this method you would use form view, not list, and you can place a portal from a different related table or table occurrence on each tab.

(or more than one on each tab if you wish..)

HTH

Link to comment
Share on other sites

  • 3 weeks later...
  • Newbies

Thanks for the suggestions. What I ended up doing was just using apparent tabs which were just buttons I styled to look like tabs, each of which led to a different layout. This is just a lot more work if I need to add a new "tab" than if this were really set up as a tab panel...

As for putting the entire tab panel in the body and making the headings invisible, I tried doing this but was unable to find a way to make the headings invisible... Even if I had managed, though, I assume they would still be there (albeit invisible) in the body, therefore taking up space - which means that in my "list" view, they would take up space between the records. The effect I want to get is a real list, with one record immediately above the other, and I don't see how I can manage this with this suggestion (unless I misunderstood the suggestion).

In any case, thank you both for taking the time to suggest ways to solve the problem!

Link to comment
Share on other sites

To make the headings invisible, set tab width to fixed width of 0 (requires version 9 or higher). If you also set the border to 'none' the tab object will become completely invisible.

To make sure the height of the object can be made equal or less than body height, set the font size to 1.

Link to comment
Share on other sites

This topic is 5386 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.