-
-
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
Godot 4 rc3: TabBar child node set anchor not working in the editor. #73785
Comments
TabContainer already contains a TabBar. What are you trying to do? |
i mean when i create content inside tabbar, i can't set anchor to it. For example when I create a button, i can't set it center or full rect to it. Everything is still normal when on godot 3.5. Ghi.Man.hinh.2023-02-24.luc.09.40.39.video-converter.com.mp4 |
My question is why are you adding extra tabbars to the TabContainer, when TabContainer already has a tabbar, and you don't need to add one yourself. Tabs will be created automatically once you add any control node child to the TabContainer. So what are you trying to achieve by adding extra tabbar nodes? |
For multiple tabs, of course. Even so, still have a bit of a problem with setting anchor to it. Especially in ui interface design. |
@dqdthanhthanh You don't need to add Same is true for 3.x, where I assume you use the |
Thanks. But I mean set anchor for node sometimes doesn't work. For example button node (video from 15 seconds) Ghi.Man.hinh.2023-02-24.luc.21.46.49.video-converter.com.mp4 |
Plain Control nodes don't have any size, and don't grow in size to fit their children. So your second and third tabs have no side. Anchoring works correctly, as far as I can see, because controls have no size and are displayed from top-left. You want to use containers there not plain controls and anchors. |
Yes, you aren't using containers where you should. And you also need to set min size, not just size, as containers will override the size (and position) as that is their function. |
same issue and explains better: #74653 |
Godot version
v4.0.rc3.official (7e79aea)
System information
Mac Air M1 2020
Issue description
TabBar childs anchor not working in editor.
Steps to reproduce
Create a TabContainer node with some Tabbar node inside it. Then create some UI node inside Tabbar node. Set any anchor to child node, nothing happen. The child still in Vector2.ZERO.
Note: only child on first Tabbar node works.
Minimal reproduction project
Uploading GodotProject.zip…
The text was updated successfully, but these errors were encountered: