Depending on a condition of the current record is it possible to enable/disable a specific tab in a tabpanel? I’d like to allow the user to click on the disabled tab for an explanation why they can’t go there and still let them use the other tabs of the tabpanel.
Can this be done?
The available syntax for “enabled” (page 207 Developer Guide Vol2) seems total for the tabpanel itself. Am I looking in the wrong place?
have a look at
elements.your_tab_panel.setTabEnabled(3, false);
This will disble tab 3 of your_tab_panel.
Found it! setTabEnabled(tab number,true/false). Excellent.
If TabEnabled is set to false then nothing will work so Morley will not be able to give his users a message.
Maybe workaround would be to create labels for the tabs - then test the TabEnabled condition before going to the Tab or showing a ‘why not’ message.
Graham Greensall
Worxinfo Ltd
Maybe use tooltiptext ?
programmatically set the tooltiptext for the tab (or a global field to drive the tooltip) based on the enabled state ?
Cheers
Harry
Harry Catharell:
Maybe use tooltiptext ?
programmatically set the tooltiptext for the tab (or a global field to drive the tooltip) based on the enabled state ?
I like the idea of a tooltip. After all the user will be mousing the tab.
However I’ve not figured out how to put a condition into an i18n key. Tried an endrun with a calculation but Servoy doesn’t support accessing forms in a calculation.