Skip to content

Plot scaling #37

Answered by Blake-Madden
PBfordev asked this question in Q&A
Aug 16, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi PB!

So, rather than hard-coded sizes, the library takes more of a "scale and proportions" approach to sizing.

  1. When a canvas's parent is resized, then the canvas (and its children graphs) will resize along with it. However, I think you could force a canvas to always be a certain size via the sizer you place it in. Canvas also derives from wxScrolled, so the base SetMaxSize() and SetMinSize() from wxWindow might do the trick (maybe depending on which type of container it is in).

Canvas does have a separate "SetCanvasMinSize()" API that forces it to never go smaller than a certain size (otherwise the scrollbars go into effect). If the aforementioned suggested don't work, would a new Set…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@PBfordev
Comment options

Answer selected by PBfordev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants