Bug 18874 - ScrollBar doesn't show/hide properly for growing/shrinking subcontrols
Summary: ScrollBar doesn't show/hide properly for growing/shrinking subcontrols
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-04-08 18:13 UTC by Stephen McConnel
Modified: 2014-04-15 16:29 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
I'm attaching a test program that demonstrates the problem. The program works fine for Visual Studio 2010, but not for Mono 3.2.4 (or Mono 2.10.9 for that matter). (7.03 KB, application/x-compressed-tar)
2014-04-08 18:13 UTC, Stephen McConnel
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Stephen McConnel 2014-04-08 18:13:06 UTC
Created attachment 6533 [details]
I'm attaching a test program that demonstrates the problem.  The program works fine for Visual Studio 2010, but not for Mono 3.2.4 (or Mono 2.10.9 for that matter).

When a panel contains an autosized subcontrol that may grow or shrink in height, the scroll bar is not displayed properly unless it is somehow laid out a second time.  The code for adding/removing the scrollbar in ScrollableControl.cs is run before the layout is performed, but the layout may well dictate what the scrollbar should do!
Comment 1 Stephen McConnel 2014-04-09 17:07:36 UTC
I've submitted a pull request with my proposed fix for this bug.
(https://github.com/mono/mono/pull/987)
Comment 2 Miguel de Icaza [MSFT] 2014-04-15 16:29:17 UTC
Applied fix