mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-20 19:08:56 +00:00
BeginChild Resize to Contents? #1666
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#1666
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is there a resize to content mode for an axis using
ImGui::BeginChild()?I want to have horizontal scrolling but I don't want there to be vertical scrolling. I want it to resize to the size of the contents vertically. Is there anything like this?
I can manually set a fixed size, but then I need to calculate and compensate for when the horizontal scrollbar might be visible.
Hello @skl131313, unfortunately it isn't possible at the moment. I see what you are trying to do and agree it would be helpful. I have an idea of how to implement it but it's not a trivial change and I don't know when I'll be able to tackle it.
In the meanwhile, maybe using both flags
ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbarcan allow you to compute that extra height for the scrollbar since it won't change any more.No worries if it requires a big change, it's more of a nice to have feature than a requirement.