Home › Forums › General › Programming › Reaching tabs properties
Tagged: getChildComponent, tabs, uiComponent
- This topic has 12 replies, 3 voices, and was last updated 3 years, 1 month ago by
dnaldoog.
-
AuthorPosts
-
October 10, 2020 at 10:43 am #120231
Anyone knowing how to reach the properties of the individual tabs?
Those are children of the tab component.
I have triedconsole(tostring(panel:getComponent("myTabs"):getChildComponent(0):getProperty("uiTabsTabIndex")))
but without success…
October 10, 2020 at 1:12 pm #120232Hi 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.
See line: 339
-
This reply was modified 3 years, 1 month ago by
dnaldoog.
October 10, 2020 at 2:00 pm #120233Shit… 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!October 10, 2020 at 2:49 pm #120238I looked further and found
https://github.com/RomanKubiak/ctrlr/blob/master/Source/UIComponents/CtrlrComponents/Groups/CtrlrTabsComponent.hIs 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…October 10, 2020 at 4:17 pm #120240Hi 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
Attachments:
You must be logged in to view attached files.October 10, 2020 at 7:57 pm #120242Thx. 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”October 10, 2020 at 8:43 pm #120243Not adding much to the discussion but here’s a nifty little program to search through all .h and .cpp files in a certain folder:
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.
October 10, 2020 at 9:01 pm #120244OK. 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!October 10, 2020 at 10:17 pm #120245If 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.
October 11, 2020 at 10:48 am #120248Seems 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.
October 11, 2020 at 2:47 pm #120260I’ll try that. Thx!
October 11, 2020 at 5:33 pm #120253Hi 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,
-
This reply was modified 3 years, 1 month ago by
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.