Reaching tabs properties

Home Forums General Programming Reaching tabs properties

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #120231
    goodweather
    Participant
      • Topics: 45
      • Replies: 550
      • Total: 595
      • ★★★

      Anyone knowing how to reach the properties of the individual tabs?
      Those are children of the tab component.
      I have tried

      console(tostring(panel:getComponent("myTabs"):getChildComponent(0):getProperty("uiTabsTabIndex")))

      but without success…

      #120232
      dnaldoog
      Participant
        • Topics: 4
        • Replies: 480
        • Total: 484
        • ★★

        Hi Goodweather,

        Maybe it’s not possible because all these methods are commented out and it’s the only reference to that method I can see anywhere.

        https://github.com/RomanKubiak/ctrlr/blob/de28dc3ad3591a5832f1e38ce8adabc9369b1011/Source/Lua/JuceClasses/LComponents.cpp

        See line: 339

        • This reply was modified 3 years, 6 months ago by dnaldoog.
        #120233
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          Shit… Well found dnaldoog!
          That must be it…
          I think I need to prioritize the build and compilation work of Ctrlr 5.3.201 in order to make some changes.
          I put it in my to-do list of bug corrections / small enhancements.
          Thx!

          #120238
          goodweather
          Participant
            • Topics: 45
            • Replies: 550
            • Total: 595
            • ★★★

            I looked further and found
            https://github.com/RomanKubiak/ctrlr/blob/master/Source/UIComponents/CtrlrComponents/Groups/CtrlrTabsComponent.h

            Is there a way to go to a specific level of a value tree in order to set the property?
            I want to change the background image of a specific tab…
            void setBackgroundImage (const Image &_tabBackgroundImage) { tabBackgroundImage = _tabBackgroundImage; }

            Is it mandatory to have uncommented lines in LComponents.cpp? Maybe that those functions have been replaced by others…
            Also, when doing what () on a component, you are getting the getChildComponent() function listed
            So frustrating to not have any explanations…

            #120240
            dnaldoog
            Participant
              • Topics: 4
              • Replies: 480
              • Total: 484
              • ★★

              Hi Goodweather,

              That previous post is all a bit beyond me I am afraid! I only know about valueTree for saveState and loadState, but if you want true flexibility with background images on tabs, you could cheat by having a component in a layer sitting below the transparent tabs object that changes (repaints) on a tab click. You can do anything with images in uiComponent including tiling all pretty easily.

              Here is an example panel using metatable to initialise an image for the uiComponent on boot (that could be a transparent png for example)

              Regards,

              JG

              example of uiComponent to draw images

              Attachments:
              You must be logged in to view attached files.
              #120242
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                Thx. I will look at that.
                Funny enough, I was going to ask you to make a short tutorial about layers as I know you have been using that in one of your panel.
                Maybe create a new topic about “How to create and use layers”

                #120243
                Tedjuh
                Participant
                  • Topics: 9
                  • Replies: 97
                  • Total: 106
                  • ★★

                  Not adding much to the discussion but here’s a nifty little program to search through all .h and .cpp files in a certain folder:

                  https://www.voidtools.com/

                  It’s easier to download the commit and do a local search. Under “search” there is an option to search in a certain folder instead of the full HDD.

                  #120244
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    OK. I searched a bit and found the Layers editor (never used it).
                    What is the top layer? 0?
                    What means the 0000000 in the middle and that you can edit?
                    How do you assign a modulator to a layer? The “component layer ID” field is not editable
                    Thx!

                    #120245
                    Tedjuh
                    Participant
                      • Topics: 9
                      • Replies: 97
                      • Total: 106
                      • ★★

                      If you have layer 0,1,2.. the highest number is the top level.

                      You can name the layers. Can’t remember if that is what the 0000 is for.

                      See demo panel layer/ tabs.

                      #120248
                      Tedjuh
                      Participant
                        • Topics: 9
                        • Replies: 97
                        • Total: 106
                        • ★★

                        Seems that not all my replies got through.

                        There is this nifty little program named “Everything” from a company named “Voidtools”. It’s a very good search program that lets you search in folders or just files. If you download the Ctrlr commit, you can search the folder locally. Easier than clicking around the Github repository.

                        #120260
                        goodweather
                        Participant
                          • Topics: 45
                          • Replies: 550
                          • Total: 595
                          • ★★★

                          I’ll try that. Thx!

                          #120253
                          dnaldoog
                          Participant
                            • Topics: 4
                            • Replies: 480
                            • Total: 484
                            • ★★

                            Hi Goodweather,

                            I made a tutorial for layers. It should explain some of your questions. I tried to keep it as basic as possible for people beginning with Ctrlr.

                            See https://ctrlr.org/forums/topic/using-layers-tutorial-1-0/

                            Regards,

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • The forum ‘Programming’ is closed to new topics and replies.
                          There is currently 0 users and 92 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