| Newsgroups |
gmane.comp.python.wxpython |
| Message-ID |
<[email protected]> |
Hi Tim,
I really appreciate your answer. Yes I agree that sizers are awesome. They make life so much easier.
Best,
Juan
From: [email protected] <[email protected]> On Behalf Of Tim Roberts
Sent: Saturday, November 16, 2019 12:11 AM
To: 'Khanh D Dang' via wxPython-users <[email protected]>
Subject: Re: [wxPython-users] sizers and proportions
On Nov 15, 2019, at 11:52 PM, [email protected] <mailto:[email protected]> wrote:
I am trying to wrap my mind around the proportion values in the .Add methods for the various sizers.
If I have a horizontal box sizer, and I add two vertical box sizers and I want the left one to be 1/3 of the window and the right to be 2/3 of the window, would my proportions be for the left 1, and the right 2?
Correct!
What if I had 4 equal sized areas, would the proportions be 1 for each control? And would the number of controls matter? If I wanted them to take up the same space, so if it was 4,5,6 etc the proportion would just be 1 for all of them right?
Correct! I think you have an excellent grasp of the concept.
Last question these are just exercises to understand how this is done:
I saw an issue on the internet that someone was trying to add three text controls to a horizontal box sizer. He needed the proportions to be 4, 3, 16 respectivly. Given these numbers what would this do?
The three boxes would be 4/23, 3/23 and 16/23 of the total space. So, the first box is about 1/4 the size of the final box, and the one in the middle is a bit smaller.
Sizers are one of the reasons I use wxWidgets even for my Windows-only C++ work. It just makes layout management so much easier,.
—
Tim Roberts, [email protected] <mailto:[email protected]>
Providenza & Boekelheide, Inc.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> .
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/1AD0A5A0-1C7A-411A-8A50-D91D170E8958%40probo.com <https://groups.google.com/d/msgid/wxpython-users/1AD0A5A0-1C7A-411A-8A50-D91D170E8958%40probo.com?utm_medium=email&utm_source=footer> .
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/010501d5a0b3%24fdcae3a0%24f960aae0%24%40gmail.com.