-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose the TabBar
of a TabContainer
#80227
Conversation
In my original PR, where I made |
I'm not totally sure I need this to be exposed, my goal is just to add buttons to the right of the |
Funnily enough, there's a theme constant that does something similar, |
I'm not sure how I can use For context, I'm using To achieve this I'm using this code1: var tabs = TabContainer.new()
var tab_actions = HBoxContainer.new()
tab_actions.size_flags_vertical = Control.SIZE_EXPAND_FILL
tab_actions.size_flags_horizontal = Control.SIZE_EXPAND_FILL
tab_actions.alignment = BoxContainer.AlignmentMode.ALIGNMENT_END
tab_actions.set_anchors_and_offsets_preset(Control.LayoutPreset.PRESET_FULL_RECT)
tabs.get_tab_bar().add_child(tab_actions) Footnotes
|
I was just pointing out one of the node's features that could be modified to achieve that. Considering that currently |
I've opened #80301 to implement your suggestion. Either way works for me, let me know which you prefer or if you want me to change it further. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally speaking, I don't see any harm in this. We expose methods to get inner nodes all the time, and this one is pretty important to the affected container. That said, if for the particular problem we don't need this solution specifically, then perhaps we should wait for some demand.
Add `TabContainer::get_tab_bar` method to retrieve the `TabBar` of a `TabContainer`.
bdac413
to
408a08f
Compare
Thanks! |
Add
TabContainer::get_tab_bar
method to retrieve theTabBar
of aTabContainer
.