#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    35
    Rep Power
    2

    Hide a TTabbedNotebook Tab


    I'm needing to hide a single tab of ttabbednotebook component. I googled it and ask in some other forums. No response.

    Would someone of you able to help me?

    before: tab1 tab2 tab3 tab4 tab5
    after: tab1 tab2 tab4 tab5

    Greetings from São Paulo - Brasil

    Ricardo
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    19
    Rep Power
    0
    Originally Posted by nightrider43
    I'm needing to hide a single tab of ttabbednotebook component. I googled it and ask in some other forums. No response.

    Would someone of you able to help me?

    before: tab1 tab2 tab3 tab4 tab5
    after: tab1 tab2 tab4 tab5

    Greetings from São Paulo - Brasil

    Ricardo
    Use the page ID and "TabVisible" and "TabEnabled"

    for example

    NoteBook.Pages[0].TabVisible:=false

    Will make first tab invisible.

    NoteBook.Pages[0].TabEnabled:=false

    Will make first tab disabled.

    I had this exact same issue recently but managed to find help on google after a bit of searching. I have no idea why Delphi does it this way.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    35
    Rep Power
    2
    The component we are talking about is TTabbedNotebook, no Notebook.

    The properties TabVisible and TabEnabled are not available in this case.

    Cheers
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    19
    Rep Power
    0
    I assumed it would be same as a pagecontrol. Using the ID.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    35
    Rep Power
    2
    The construction:

    TTabbedNotebook.Pages.Delete(2) works fine.

    Thank you

    Ricardo

IMN logo majestic logo threadwatch logo seochat tools logo