Is there a way to get a view to draw centered (in the frame, or in its parent)?
The resize flags allow pinning to any given side or sides, but there isn’t a combination that will cause the view to center in its parent. When our window is resized beyond a certain point, we’d like to center our outermost view (a CViewContainer), leaving the default black background to show around all the edges.
I thought of overriding drawRect() in my own CViewContainer descendant, but the transform member is private, so my derived class can’t access it to make it behave differently from the CViewContainer.
I also don’t see a way to call down to my view from onSize in the plugin view, to move my view so that it is centered.
So far, the only solution I’ve found is to surround my view with one-pixel-wide views that are resizable themselves (but those nine-part-bitmaps can be awfully slow sometimes).
Anyone know how best to approach this?