Handling Dynamic Tabs:
Hiding TabPanes (or Listbox or combobox)
All Magic Windows versions
Finally found a simple solution for a question which is raised already several times.
With an example:
You can define a Tab with labels 1,2,3,4,5
When you place your fields on it you can link them on different tabs, you run it ... no problem you see tab 1,2,3,4,5
BUT
if you say user X may
not see tab 2 and 3 you have a problem.
If you use
variable conditions on the '
Label' of the tab and make it look 1,4,5 the tab will be (in runtime) named correctly 1,4,5 but the linked fields will be wrong.
Tab 1 will show fields of Tab 1, Tab 4 will show fields of Tab 2, Tab 5 will show fields of Tab 3 !!
You can solve this with displaying always 1,2,3,4,5 and many conditions on the fields like not visible but a more simple solution is :
In
Record Main:
Select Vitual v-tab
Select Vitual v-combo Init=v-tab
{that's a new example of the 9.4 new feature Forward Recomputation ;-) }
On
Form:
Place the Tab and the Combo on the form.
The Tab will have as Label the 'variable' expression depending on user X his rights (so that it becomes tab 1,4,5)
The Combo will ALWAYS have all the posibilities possible in the TAB.
LINK all your fields of the Tab to the COMBO !!
Make the combo unvisible with a width-expression=0 (don't set the property visible='false'log !!)
... And you're done.
How it works ?
Clicking on the tab-value 4 will change the v-combo in the same value as the v-Tab.
On screen the fields linked to the v-combo (4) will become visible. The Tab-panes will only have 1,4,5
Hope it will be usefull for some ...
Frank Van Herreweghe
Back to:
TuTorials
Category
CategoryHowTo
There are no comments on this page. [Add comment]