Trying to add a close button on panel tabs

Home Forums General Programming Trying to add a close button on panel tabs

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30239
    synth
    Participant
      • Topics: 13
      • Replies: 35
      • Total: 48

      So I am trying to locate the C++ code which draws the tabs for each panel in the panel editor. I am going to try adding close buttons to the tabs just like you have for the Lua Editor method tabs.

      And a ‘+’ at the right side of the rightmost tab to allow adding a new panel when clicked.

      I am guessing its somewhere in Source\UIComponents\CtrlrPanel\CtrlrViewport.h but not certain of that yet.

      #30240
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        You need to createa a custom LookAndFeel class that draws additional buttons on the tab. You can have a look how it’s done in the LuaEditor classes.

        #30270
        cyber.cbm
        Participant
          • Topics: 2
          • Replies: 4
          • Total: 6

          I think only lookandFeel wont do it, need another button to be attached to TabBarButton of tabbedComponent. And plus lookAndfeel to show that extra button according to where we are showing tabs.

          May be for this one need to provide customized TabbedComponent which can give custom TabBarButton to MultiDocumentPanel, And for that might need to create another MultiDocumentPanel and it’s addPanel as many of items needed in addPanel are private.

          let’s think if Is there another alternative ?

          • This reply was modified 9 years, 6 months ago by cyber.cbm.
        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 64 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr