ScrollableControl.HScroll 属性

定义

获取或设置一个值,该值指示水平滚动条是否可见。Gets or sets a value indicating whether the horizontal scroll bar is visible.

protected:
 property bool HScroll { bool get(); void set(bool value); };
protected bool HScroll { get; set; }
member this.HScroll : bool with get, set
Protected Property HScroll As Boolean

属性值

Boolean

如果水平滚动条是可见的,则为 true;反之,则为 falsetrue if the horizontal scroll bar is visible; otherwise, false.

注解

还可以通过调用 GetScrollState SetScrollState 并使用 ScrollStateHScrollVisible 作为参数来实现 HScroll 属性的功能。The functionality of the HScroll property can also be accomplished through calls to the GetScrollState and SetScrollState methods using ScrollStateHScrollVisible as the parameter.

请注意AutoScroll 自动维护滚动条的可见性。Note AutoScroll maintains the visibility of the scrollbars automatically. 因此,启用 AutoScroll 后,将 HScrollVScroll 属性设置为 true 不起作用。Therefore, setting the HScroll or VScroll properties to true have no effect when AutoScroll is enabled.

适用于

另请参阅