Hide individual Tab

tompynationtompynation Member Posts: 398
Is it already possible in NAV5 SP1 to hide an individual tab,

So not the entire tabcontrol but just 1 tabpage

Comments

  • garakgarak Member Posts: 3,263
    no, you can only hide the controls on Tab.
    Do you make it right, it works too!
  • WoFWoF Member Posts: 5
    If i can't hide a tab - is there any other possebility to mark tabs?
    i think such things like font, colors, bold... My users want see a state of the tab and i'm afraid now i have to design a overview-tab.

    I wrote programms for the past twenty years but i'm very new in navision. Any ideas are welcome.

    WoF
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Take two tab controls and place them on top of each other. One with all tabs and one without some tabs. Give them a control name and enable/disable that one you want to see / you don't want to see.

    But I have no idea how to highlight one specific tab. Sorry.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • WoFWoF Member Posts: 5
    Nice idea - but i have 11 tabs and nearly every kombination is possible.

    Next time i attend some courses and i will ask the teachers after this. I will post the answer here in about 1 month.

    WoF
  • garakgarak Member Posts: 3,263
    The eaysiest solution: hide the controls on Tab.
    If you create more then 1 TabControls, you must ever changed all, if you have some modifications (new Fields / delete fields, etc.)

    But you know in which case the contrlos must be hide. so its easy to create a simple Function on Form like this example
    Name	DataType	Subtype	Length
    YourStatus	Boolean		<- Your Status can be a variable or, if you not need a variable, the value of a field, then the variable YourStatus is not needed
    
    Form - OnAfterGetRecord()
    InitControls();
    
    InitControls()
    CurrForm."No.".VISIBLE(YourStatus);
    CurrForm."No. 2".VISIBLE(YourStatus);
    CurrForm.Description.VISIBLE(not YourStatus);
    CurrForm."Search Description".VISIBLE(not YourStatus);
    CurrForm."Description 2".VISIBLE(not YourStatus);
    

    Regards
    Do you make it right, it works too!
  • awarnawarn Member Posts: 261
    I had to do something similar to this, and ended up making a subform for each 'tab', and textboxes for each tab header, and then filling in the textboxes dynamically based on setup, and then hiding the unused subforms if they were not needed.

    It was on the item card, the user needed to see a list of prices for each state, and based on how many states were setup determined how many tabs appeared.

    So this might be the way to go, but if the customer wanted this sort of thing on every tab control on every form in the system then I would not go down that road.

    -a
  • DenSterDenSter Member Posts: 8,305
    WoF wrote:
    Next time i attend some courses and i will ask the teachers after this. I will post the answer here in about 1 month.
    You can ask, but we already know the answer. It is not possible to hide individual tabs.

    There is one way to simulate tabs, and that is to use subforms and buttons, pretty much the way the old menu forms in Navision used to work. By placing the buttons and subforms in a certain way, you can make it kind of look like it's a tab control, and that way you can take control over what is visible, and even where to place the buttons. This is not part of the standard guidelines though.
  • DenSterDenSter Member Posts: 8,305
Sign In or Register to comment.