Tab control VISIBLE properties - help

abartonicek
abartonicek Member Posts: 162
edited 2005-10-25 in Navision Attain
Is it posible to hide ONLY ONE tab in tab control?
Better to be critical then self-critical :)

Comments

  • Arhontis
    Arhontis Member Posts: 667
    Hi,

    Try making all the controls in that tab NOT VISIBLE and I think that the tab itself will disappear (according to the Application Developers Guide).
  • abartonicek
    abartonicek Member Posts: 162
    I end up with blank tab :-k
    Maybe I'm doing something wrong?
    Better to be critical then self-critical :)
  • kriki
    kriki Member, Moderator Posts: 9,121
    Arhontis wrote:
    Try making all the controls in that tab NOT VISIBLE and I think that the tab itself will disappear (according to the Application Developers Guide).
    The tab will not disappear.
    The tab only disappears if you make the property "PageNames" of the tab blank for that page.
    Eg. PageNames=Page1,Page2,Page3,,Page5 => the fourth page you wil not see.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • abartonicek
    abartonicek Member Posts: 162
    So, in other words, I can't hide only one tab. What I wanted was to show the last tab in tab control only when some conditions were met.
    Removing tab from PageNames property doesn't cut it :(
    Better to be critical then self-critical :)
  • kriki
    kriki Member, Moderator Posts: 9,121
    I am not sure (never tried it out), but you can create 2 tabcontrols, and hide 1 of those 2 depending on the condition.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • abartonicek
    abartonicek Member Posts: 162
    I know.
    I have 4 tabs a they have about 30 controls. I wanted to add another control with some specific (rarely used) controls. Depending on one control I would show that last tab.
    Creating another Tab control (with 4 + 1 new tab) would duplicate the côde that I allready have for the existing controls. Right?
    Better to be critical then self-critical :)
  • abartonicek
    abartonicek Member Posts: 162
    Sorry, correction:
    ...I wanted to add another TAB...
    Better to be critical then self-critical :)
  • kriki
    kriki Member, Moderator Posts: 9,121
    Maybe if you give the controls on the 2 tabs the same name, it is possible that you don't have to do it. But I wouldn't trust it anyway.
    Also, maintaining the form later gets a lot more complicated.
    The best thing you can do is just hide the controls you don't need. If there is a blank tab, ... well so be it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • abartonicek
    abartonicek Member Posts: 162
    I did that, but I hoped... :(
    Thx for help.

    I have one (only one? :)) more question:

    When relating one table to another, if you want to delete something in one table a automatically delete the same thing in the other you have to put that in côde, right?
    Better to be critical then self-critical :)
  • Arhontis
    Arhontis Member Posts: 667
    Yep, in the OnDelete function of the parent table...
  • abartonicek
    abartonicek Member Posts: 162
    Tnx.
    Better to be critical then self-critical :)