I'm creating something like a timeline of sorts, where each "thing" on the timeline (not a layer, as there is only one row) is in an absolute position.
I read on how to create a custom widget that contains other existing widgets, but most examples force you to draw the widget yourself or something similar.
Another way I've found is to create a class that derives btBoxSizer, but that doesn't work since wxBoxSizer causes non-absolute positioning.
Creating a custom widget that has other widgets in absolute positions? Topic is solved
-
- Knows some wx things
- Posts: 39
- Joined: Fri Feb 02, 2018 1:48 pm
Re: Creating a custom widget that has other widgets in absolute positions?
if you derive your class e.g. from wxWindow or wxPanel, you can position children of this control with absolute coordinates (relative to their parent).
See the "pos" and "size" parameters:
http://docs.wxwidgets.org/trunk/classwx ... b4994f922e
See the "pos" and "size" parameters:
http://docs.wxwidgets.org/trunk/classwx ... b4994f922e
Use the source, Luke!