I’ve created a navigator menu with tabpanel. It works like a charm.
Question: when in a form I haven’t records, I could hidden the structure (design) of the form?
example: tabpanel with form1, form2 and form3. Form1 has 3 records with relations with the ‘master’ record on generic form. Form2 nothing. Form3 2 records. Well, Form2 has normally a structure. It’s possible to hidden the form2 when there aren’t records?
Just thinking loudly here..
I think what you want is to hide or disable the tab if there are no records in the form, the structure itself stays like it is.
This can be achieved - I think - if you make your own tab-buttons.
Then make a method that checks all the tab forms on zero records.
This (refresh) method has to be triggered every time you do some kind of action: eg. clicking a tab button.
Include in the method a disable or hide instruction for the tab-button(s).
Ron:
Then make a method that checks all the tab forms on zero records.
ehmm … sorry Ron,
have you an idea for me to do that?
I would use the method suggested from HJK, but how could I say “in my standard tabpanel, when I click on the first tab button (the most important form), please check the other tabs, and if records=0 use the HJK method” … ?
It’s possible? or not?
thanks for any suggestion
Regards
Andrea
Don’t you have to use IF (false) ELSE (true) statements?
Once a tabpanel is disabled, it stays that way.
BTW, the way you do it, the entire tabPANEL is dis/enabled.
I thought we were talking about those little tabBUTTONS?
I gave it a try: gave the tab(button) a name in the properties, but it did’nt show up as an element in the editor. Am I missing something?
I did refresh, but it just won’t show up.
One would expect that after giving the name-property to an object, it should always appear as an element in the editor.
Can you give it a try?
HJK:
connect the method to the onShow and on to the onRecordSelect property!
well, it works like a charm only for the first record.
Situation:
general_form and tab1 from the same table.
tab2, tab3 and tab4 related
tab1 has the controller.
I’ve connected the method to the onShow and onRecordSelection in the general_form, but I use the tab1 controller.
For the first record, the method works correctly. When I change record, I see the tabs as the first record, and not as that record.
Where is my mistake?
in this case, for record 1 “progetti” and “documenti” = 0 records.
That’s correct.
But if I change record (example, record 2), I see always “progetti” and “documenti” = 0, while “progetti” = 3 records.
Refresh??