C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

C1SizerLight

rated by 0 users
This post has 3 Replies | 0 Followers

Top 25 Contributor
Posts 327
vantibus Posted: Thu, Oct 19 2006 2:33 PM
So I layout my entire form, write and test all the code, and when done think, "Wow, this is great, but I'd like all my controls and fonts to resize when the user resizes the form."

So, I add a C1SizerLight to my completed form, run the app, and get No resizing.  Why don't controls added before C1SizerLight get added to the "resize list" automatically?  You made the Sizer smart enough to detect controls added to the form after Sizer exists, but not smart enough to go find existing  controls when Sizer is added to the form.  Seeing as how Sizer has a method (GetAutoResize) to do the latter, it seems to me it should be easy for you to make Sizer smarter.

After adding "SizerLight.GetAutoResize(this);" to my Form_Load event I discovered the following:

- C1Combo is a disaster.  Although the Width increases/decreases as the form is sized, the height of the combo never changes.  The combo's dropdown is even worse:  the font size changes, but the dropdown-width doesn't and neither does the height of the line items (rows).

- Why do Buttons behave differently than Textboxes, et. al?  Increase a forms height (only) and  all the button heights increase, while everything else, remains the same height.  Buttons should keep the same proportion as everything else, no matter how the form is resized.


C1SizerLight deleted from my form.
Top 10 Contributor
Posts 2,707
The SizerLight sends resize commands to all controls on the form.

Some controls may not honor these commands tough. For example:

1) the TextBox control allows you to set its height only if MultiLine =
true. (Otherwise the height is set automatically based on the Font)
2) the ComboBox control allows you to set its height only if DrawMode =
OwnerDraw.
3) the ListBox control allows you to set its height (exactly) only if
IntegralHeight = false.
Top 25 Contributor
Posts 327
vantibus replied on Tue, Oct 24 2006 6:50 PM
It helps to know the rules.  Is this useful info in the manual/help?
Top 10 Contributor
Posts 2,707
> It helps to know the rules. Is this useful info in the manual/help?

I don't know, but I will forward this to the documentation team for
inclusion if necessary. Thanks for the reminder.
Page 1 of 1 (4 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.