[Mono-bugs] [Bug 357152] ListBox' s Size does not reflect actual size after being adjusted due to anchoring

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 30 23:48:58 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=357152

User jdpurcell2 at yahoo.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=357152#c1





--- Comment #1 from James Purcell <jdpurcell2 at yahoo.com>  2008-01-30 21:48:58 MST ---
Created an attachment (id=192473)
 --> (https://bugzilla.novell.com/attachment.cgi?id=192473)
patch

This also fixes several other issues:

1) After a listbox is created (i.e. CreateControl) it should adjust its height
if necessary for IntegralHeight.  This bug isn't usually obvious unless the
listbox has enough items to require a scrollbar, in which case the scrollbar is
the correct height but the list is visibly taller.  The current code actually
always adjusts the height for IntegralHeight in SetBoundsCore, but since
CreateParams uses Height (and therefore HeightInternal) it doesn't get created
with the correct size.  Note that in MS.NET CreateParams.Height is also not
adjusted for IntegralHeight, so the correct fix is not to modify how we make
CreateParams, rather the height should be adjusted after the control is
created.  Also, this should happen even if the listbox is using its default
size.  This breaks the ListBoxTest.ClientRectangle_Borders test, but I believe
that test is invalid (does it work in MS.NET?).

2) When a listbox's IntegralHeight property is set false, it should resize its
height to requested_size.  When set true again, it should resize to avoid
showing partial items.  The idea in the current code is to always call
SetBounds with requested_height and SetBoundsCore will adjust for
IntegralHeight, but this doesn't work because SetBounds only calls
SetBoundsCore when its height parameter is different than the control's height.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list