Example





In This Topic
GdPicture14 Namespace / GdViewer Class / ScrollBars Property

ScrollBars Property (GdViewer)

In This Topic
Determines if the scrollbars are enabled, that means whether the scrollbars are to be displayed or not within the GdViewer control.

If this property is set to true, the scrollbars appear when the area to render is larger than the control. Turning this property to false forces both scrollbars to be always invisible, whatever the zoom configuration is.

Syntax
'Declaration
 
Public Property ScrollBars As Boolean
public bool ScrollBars {get; set;}
public read-write property ScrollBars: Boolean; 
public function get,set ScrollBars : boolean
public: __property bool get_ScrollBars();
public: __property void set_ScrollBars( 
   bool value
);
public:
property bool ScrollBars {
   bool get();
   void set (    bool value);
}

Property Value

The default value is true.
Remarks
Please ensure that you have correctly set the ForceScrollBars property to enable or disable displaying the scrollbars if necessary.
Example
How to utilize this property in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
If (GdViewer1.HScrollVisible = False) OrElse (GdViewer1.VScrollVisible = False) Then
    GdViewer1.ScrollBars = True
    GdViewer1.ForceScrollBars = True
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
if ((GdViewer1.HScrollVisible == false) || (GdViewer1.VScrollVisible == false))
{
    GdViewer1.ScrollBars = true;
    GdViewer1.ForceScrollBars = true;
}
See Also