how to identify the form that is referred to in a tab panel

How can one identify which form is used in an existing tabpanel?

I don’t see any clue in properties of either tab panel object (and why are there two of those, anyway?), nor any clue in the Applications > Forms > [form] > elements > [tab panel] part of the methods editor.

And, can one reassign a different form to an existing tab panel?

Thanks,

Jim

getSelectedTabFormName

The form is not a property of the tab panel, it is a property of the tab object.

Thanks, Rich.

In the properties panel, six properties are shown for the tab object:

imageMedia
foreground
background
toolTipText
text
name

… none of which indicate the form that it conveys, nor allow for changing of said form. So, it appears that the only way to deduce which form is conveyed is to kludge a method for the purpose, and the way to change which method is conveyed is to throw away the tab oject and grab another (first highlighting the tab panel that it will call home). While the latter is easy enough, the former is a bit clumsy. To address this, I will make a practice of naming tab objects so as to identify the form they convey.

Jim

Jim,

Double click on the tab and it will bring you to the linked form.

Rich

… unless it conveys a form from a module, which is the case that I am dealing with. Sorry to have given incomplete information.

Hi Jim,

Overall, what is the reason for you needing to identify the form name ?

Also let’s look at the heirarchy governing a tabpanel which may help to clarify things for you - and for me :slight_smile:

And correct me if I am wrong in anything I say here too !

A tabpanel object is simply a holder for tab objects.
Thus it works as a repository for tab objects - just somewhere to put them.
It does not know much about the tabs which are in it except for their index so it can work with them.
Therefore it cannot know innately what form(s) to which they are linked !

The tab object itself is linked to a form
The properties which it has include a ‘text’ property which usually will contain the name of the form which has been chosen for that tab.
You can have one or more tab objects inside a tabpanel object

If you need to alter the tab objects which are part of a tabpanel object then you can select the tabpanel object and choose ‘elements → place tabpanel’ and picking a form will add another tab to the tabpanel - similarly selecting the tab inside the tabpanel and hitting the delete key will get rid of a current tab object inside the tabpanel.

So there are several ways to work with tabpanels with some of the key things being the limited descriptions above.

Does this answer any of your queries or are there any further questions that you have … plus don’t forget to tell me exactly what you want to achieve by working with the tabpanel

Cheers
Harry

Harry, thank you for the concise description of the workings of tab panels. Well done! Write a book, get rich (heh heh). All kidding aside, being able to convey information clearly is a gift.

So, what is the reason for me needing to identify the form name? That would be because I had made many similar forms (in the experiMental phase here) and was looking to quickly identify which one was showing through in the tab panel. As the solution is modular, Rich’s suggestion to double-click on the tab object would not in this case provide the info, so I was looking for a way to identify the form through properties. As there is nothing inherent that will show this information, the developer should make a practice of naming tab objects (or the “text” property therein as you suggest) so as to identify the form they convey (if using a modular approach).

Thanks again for your help!

Jim

p.s. Harry, tunes comin’ back at ya, soon…

jim:
Harry, thank you for the concise description of the workings of tab panels. Well done! Write a book, get rich (heh heh). All kidding aside, being able to convey information clearly is a gift.

Jim,

You can also find information about tabpanels in the:

Printed Servoy Developer Edition User’s Guide

  • Section 7.9.8 Tabpanels, beginning on page 217.

Online Servoy Help Navigator

  • Choose Help > Help (F1).
  • Click to open the Search tab.
  • Enter “tabpanel” in the search critieria.
    -Select the desired topic from the Topics list below.

Servoy Developer User’s Guide PDF

  • Open the document using Acrobat or Adobe Reader.
  • Choose Edit > Search.
  • Enter “tabpanel” in the search criteria box.
  • Press “Search”.
  • Select the desired item from the Search Results list.

Marc Norman
Servoy