[Mono-bugs] [Bug 389245] PropertyGrid: the check that value was set is too strict
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 12 10:44:40 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=389245
User contact at i-nz.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=389245#c1
Ivan Zlatev <contact at i-nz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
Info Provider| |andyhume32 at yahoo.co.uk
--- Comment #1 from Ivan Zlatev <contact at i-nz.net> 2008-05-12 08:44:40 MST ---
(In reply to comment #0 from Andy Hume)
> Created an attachment (id=214312)
--> (https://bugzilla.novell.com/attachment.cgi?id=214312) [details]
> Repro
>
> ListBox is designed to show an exact number of items vertically, thus when one
> sets a height of 100 this is rounded down to 95, and on 60 to 56 etc[1].
>
> PropertyGrid does not handle this well! For some reason it checks
> (GridEntry.cs) that the value it Set is equal to the value it now Gets, and if
> not, calls Set again with the previous value. Eeek! Thus, in this case it is
> only possible to set a exactly correct height value, if ListBox rounds the
> value down then PG throws a fit and re-applies the previous value.
>
> Ivan, do you know of the reasons for this checking?
>
I suppose that you are referring to GridEntry.SetValueCore and the following
code:
// restore original value if doesn't get set
if (!current_changed && !PropertyDescriptor.IsReadOnly)
properties[i].SetValue (propertyOwners[i], currentVal);
I am sure there was a reason to put this at the time, so this is probably a
left over which I will remove.
>
> [1] Default settings are IntegralHeight=true, a border height of 2, and an
> ItemHeight of 13. Thus 95 and 56 fit the equation (2+2+n*13). With other
> fonts an ItemHeight of 14 is active.
>
Why removing the mentioned snippet will solve potential problems, I am not very
sure what is the bug you are describing? I ran your test case on MSNET and I
was able to set the listbox height to any arbitrary value and it doesn't get
rounded - same happens when I run it on mono. What are the steps to reproduce?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list