Skip to content

Commit ddb6c95

Browse files
Fix AutoScroll effectively deactivating description (#3173)
* Fix value reference between RightToLeft and AutoScroll * Fix AutoScroll effectively deactivating description Co-authored-by: Bill Wagner <[email protected]>
1 parent 3414320 commit ddb6c95

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

xml/System.Windows.Forms/ScrollableControl.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@
184184
## Remarks
185185
When `true`, this property enables the container to have a virtual size that is larger than its visible boundaries.
186186
187-
There is currently a limitation in Windows Forms that prevents all classes derived from <xref:System.Windows.Forms.ScrollableControl> from acting properly when both <xref:System.Windows.Forms.Control.RightToLeft%2A> is enabled and <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> is set to `true`. For example, let's say that you place a control such as <xref:System.Windows.Forms.Panel> - or a container class derived from <xref:System.Windows.Forms.Panel> (such as <xref:System.Windows.Forms.FlowLayoutPanel> or <xref:System.Windows.Forms.TableLayoutPanel>) - on your form. If you set <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> on the container to `true` and then set the <xref:System.Windows.Forms.Control.Anchor%2A> property on one or more of the controls inside of the container to <xref:System.Windows.Forms.AnchorStyles.Right>, then no scrollbar ever appears. The class derived from <xref:System.Windows.Forms.ScrollableControl> acts as if <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> were set to `false`.
188-
189-
Currently, the only workaround is to nest the <xref:System.Windows.Forms.ScrollableControl> inside another <xref:System.Windows.Forms.ScrollableControl>. For instance, if you need <xref:System.Windows.Forms.TableLayoutPanel> to work in this situation, you can place it inside of a <xref:System.Windows.Forms.Panel> control and set <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> on the <xref:System.Windows.Forms.Panel> to `true`.
187+
> [!Note]
188+
> In Windows Forms when a child control is anchored to the right or bottom (<xref:System.Windows.Forms.Control> contains <xref:System.Windows.Forms.AnchorStyles.Right> or <xref:System.Windows.Forms.AnchorStyles.Bottom>) the Container will behave as if <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> were set to `false`.
189+
190+
There is currently a limitation in Windows Forms that prevents all classes derived from <xref:System.Windows.Forms.ScrollableControl> from acting properly when both <xref:System.Windows.Forms.Control.RightToLeft%2A> is enabled and <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> is set to `true`. For example, let's say that you place a control such as <xref:System.Windows.Forms.Panel> - or a container class derived from <xref:System.Windows.Forms.Panel> (such as <xref:System.Windows.Forms.FlowLayoutPanel> or <xref:System.Windows.Forms.TableLayoutPanel>) - on your form. If you set <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> on the container to `true` and then set the <xref:System.Windows.Forms.Control.Anchor%2A> property on one or more of the controls inside of the container to <xref:System.Windows.Forms.AnchorStyles.Right>, then no scrollbar ever appears. The class derived from <xref:System.Windows.Forms.ScrollableControl> acts as if <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> were set to `false`. Currently, the only workaround is to nest the <xref:System.Windows.Forms.ScrollableControl> inside another <xref:System.Windows.Forms.ScrollableControl>. For instance, if you need <xref:System.Windows.Forms.TableLayoutPanel> to work in this situation, you can place it inside of a <xref:System.Windows.Forms.Panel> control and set <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> on the <xref:System.Windows.Forms.Panel> to `true`.
190191
191192
> [!NOTE]
192193
> <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> maintains the visibility of the scrollbars automatically. Therefore, setting the <xref:System.Windows.Forms.ScrollableControl.HScroll%2A> or <xref:System.Windows.Forms.ScrollableControl.VScroll%2A> property to `true` has no effect when <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> is enabled.

0 commit comments

Comments
 (0)