ScrollBars: ControlScrollStyle;
ScrollBars: Prognoz.Platform.Interop.Forms.ControlScrollStyle;
The ScrollBars property returns a value that indicates that the component has scroll bars.
Sub ScrollsInfo(Control: IControl);
Var
Scrolls: IScrollBars;
Begin
Scrolls := Control.Scrolls;
Select Case Scrolls.ScrollBars
Case ControlScrollStyle.None:
Debug.WriteLine("Component has not scroll bar.");
Case ControlScrollStyle.Horizontal:
Debug.WriteLine("Horizontal scroll bar:");
WriteScrollInfo(Scrolls.HScrollInfo);
Case ControlScrollStyle.Vertical:
Debug.WriteLine("Vertical scroll bar:");
WriteScrollInfo(Scrolls.VScrollInfo);
Case ControlScrollStyle.Both:
Debug.WriteLine("Horizontal scroll bar:");
WriteScrollInfo(Scrolls.HScrollInfo);
Debug.WriteLine("Vertical scroll bar:");
WriteScrollInfo(Scrolls.VScrollInfo);
End Select;
End Sub ScrollsInfo;
Sub WriteScrollInfo(Info: IScrollInfo);
Begin
Debug.WriteLine("Minimum position: " + Info.Min.ToString);
Debug.WriteLine("Maximum position: " + Info.Max.ToString);
Debug.WriteLine("Page size: " + Info.Page.ToString);
Debug.WriteLine("Current slider position: " + Info.Pos.ToString);
End Sub WriteScrollInfo;
The ScrollsInfo procedure allows to get information about scroll bars of the component that is passed as the Control input parameter. Information about scroll bars is displayed in the development environment console.
See also: