|
49 | 49 |
|
50 | 50 | The <xref:System.Windows.Forms.ScrollableControl> class acts as a base class for controls that require the ability to scroll. To enable a control to display scroll bars as needed, set the <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> property to `true` and set the <xref:System.Windows.Forms.ScrollableControl.AutoScrollMinSize%2A> property to the desired size. When the control is sized smaller than the specified minimum size, or a child control is located outside the bounds of the control, the appropriate scroll bars are displayed.
|
51 | 51 |
|
52 |
| - To manually override which scroll bars are visible, set the <xref:System.Windows.Forms.ScrollableControl.VScroll%2A> and <xref:System.Windows.Forms.ScrollableControl.HScroll%2A> properties. If either property is set to `false`, the corresponding scroll bar is not visible, even if the <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> property is set to `true`. |
| 52 | + When developing custom controls that respond to layout changes by displaying scroll bars, set the <xref:System.Windows.Forms.ScrollableControl.VScroll%2A> and <xref:System.Windows.Forms.ScrollableControl.HScroll%2A> properties. If either scroll bar is not visible, set the corresponding property to `false`, even if the <xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A> property is set to `true`. |
53 | 53 |
|
54 | 54 | You can handle the <xref:System.Windows.Forms.ScrollableControl.Scroll> event to know when the user or code scrolls the client area.
|
55 | 55 |
|
|
174 | 174 | <value>
|
175 | 175 | <see langword="true" /> if the container enables auto-scrolling; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
|
176 | 176 | <remarks>
|
177 |
| - <format type="text/markdown"><![CDATA[ |
| 177 | + <format type="text/markdown"><![CDATA[ |
178 | 178 |
|
179 | 179 | ## Remarks
|
180 | 180 | When `true`, this property enables the container to have a virtual size that is larger than its visible boundaries.
|
181 | 181 |
|
182 |
| - 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 <xref:System.Windows.Forms.RightToLeft.Yes>. 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 <xref:System.Windows.Forms.RightToLeft.Yes> 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 <xref:System.Windows.Forms.RightToLeft.No>. |
| 182 | + 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`. |
183 | 183 |
|
184 |
| - 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 <xref:System.Windows.Forms.RightToLeft.Yes>. |
| 184 | + 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`. |
185 | 185 |
|
186 | 186 | > [!NOTE]
|
187 | 187 | > <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