Centering a CView inside a parent container that stretches?
Posted: Wed Feb 26, 2020 7:43 pm
I have a CViewContainer which auto-sizes to keep attached to the window borders when resizing the window. Inside this container, I have added a new CView that I want to stay centered horizontally as the parent stretches, but stay the same distance from the top. To do this, in the child CView's definition in the XML, I set autosize="top". But it's not working. The view stays in the same position relative to both the top and the left, not just the top. (This is using v4.3 of VSTGUI, by the way.) Shouldn't it center horizontally in the parent view if autosize="top" is set in the XML .uidesc file?