Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Remove Tab From Within Tab Pane

  • Remove Tab From Within Tab Pane

    Posted by Kevin Martin on August 7, 2024 at 3:06 pm

    I have a window with a tab pane control that has seven tabs. I want to retire tab #2, but leave the other six intact. Due to the number of objects within each of the other panes it isn’t feasible to delete and recreate the entire tab pane object. I can’t find any information on how to do anything short of deleting the entire tab pane control. How do I delete just one tab that is NOT the last tab? Thanks!

    Andreas Pfeiffer replied 11 months, 4 weeks ago 2 Members · 5 Replies
  • 5 Replies
  • Andreas Pfeiffer

    Administrator
    August 7, 2024 at 3:27 pm

    Do you want to hide the tab or remove it entirely?

    If you just want to hide the tab a quick way would be to add a $construct to the tab pane with the following code:

    Do $cfield.$showpane(2,kFalse) ## hides tab number 2

    If you want to remove a tab in-between you can use the movetab property in the property manager to move all panes to the left from the one that you want to remove, so that the one is the last pane. Then you can delete all objects on that pane and set the tabcount to tabcount-1.

    Make sure to remove the objects in that tab before you reduce the tabcount.

    Hope this helps.

    Best,

    Andreas

  • Kevin Martin

    Member
    August 8, 2024 at 2:48 pm

    Andreas,

    I want to permanently delete the tab. However, the property you mentioned doesn’t seem to exist in v10.22. The only items on the Pane tab of the Property Manager are tab caption, tabiconid and tabtooltip. Studio documentation also shows movetab should be there, but I don’t see it.

    Looks like I may just have to live with killing all of the objects within tab pane #2 and then hiding it during from $construct, although this is less than desirable.

    Kevin

  • Andreas Pfeiffer

    Administrator
    August 8, 2024 at 2:55 pm

    Kevin,

    Yes – I always assume that you are using the latest Omnis Studio version when you do not specify in your question.

    There are some new properties in Omnis Studio 11.1 that did not exist in 10.22. You could upgrade couldn’t you?

    Otherwise you could do it manually and drag the objects from the panes right to the one you want to remove onto a 2nd page pane temporarily page by page and moving them one page to the left.

    I would not just hide the page because if you know you do not want to have them anymore it would clutter your code by still having them.

    I hope this helps.

    Best,

    Andreas

  • Kevin Martin

    Member
    August 9, 2024 at 12:22 pm

    Andreas,

    Yes, I could upgrade, but I’m in the middle of a fairly extensive update of my application and I do not with to complicate it any further at this time. Thanks for the help, though!

    Kevin

  • Andreas Pfeiffer

    Administrator
    August 9, 2024 at 12:24 pm

    You are welcome!

Log in to reply.