You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a way (using a virtual overridable function?) to change the client origin and size passed to child sizers from a custom container control
Description
I've built a custom control derived from the wxPanel, call it FancyPanel.
It draws and animate a border on mouseover and mouse down/up (technically i draw a rounded rectangle as big as the FancyPanel itself, with variable penwidth and radius of the rounded corners).
Other wxControls will be added at runtime as children of the FancyPanels, but i have no way to tell that the client size is smaller than the control size, so they end up being placed over the animated border.
According to Doublemax on the forum, there's no way to customize the client rect which will be passed to the sizers, and i think this is important for control customization.
-edit- sorry for typo in the title :(
The text was updated successfully, but these errors were encountered:
We have wxWindow::GetClientAreaOrigin() but it might only actually be taken into account for top-level windows. The simplest way to do the same thing for a wxPanel is to just put a nested wxPanel inside it and I'm not sure it's really worth doing anything else.
But maybe GetClientAreaOrigin() does work. And if it doesn't, I guess we could accept patches making it work for arbitrary windows. However I don't have any plans to work on this myself.
vadz
changed the title
Allows custom control derived from "container" to control hiw own ClientRect
Allow custom controls to define their own client rect
May 3, 2024
Request
Add a way (using a virtual overridable function?) to change the client origin and size passed to child sizers from a custom container control
Description
I've built a custom control derived from the wxPanel, call it FancyPanel.
It draws and animate a border on mouseover and mouse down/up (technically i draw a rounded rectangle as big as the FancyPanel itself, with variable penwidth and radius of the rounded corners).
Other wxControls will be added at runtime as children of the FancyPanels, but i have no way to tell that the client size is smaller than the control size, so they end up being placed over the animated border.
According to Doublemax on the forum, there's no way to customize the client rect which will be passed to the sizers, and i think this is important for control customization.
-edit- sorry for typo in the title :(
The text was updated successfully, but these errors were encountered: