SetHVScrollBarPosition Method (GdViewer)
In This Topic
Sets the required position of both the horizontal and the vertical scrollbars in one step, in other words, both scrollbars move to the newly specified coordinates.
The coordinates are expressed in pixels and they are related to the actual document area of the currently displayed page of the document displayed in the GdViewer control.
Syntax
'Declaration
Public Sub SetHVScrollBarPosition( _
ByVal As Integer, _
ByVal As Integer _
)
public void SetHVScrollBarPosition(
int ,
int
)
public procedure SetHVScrollBarPosition(
: Integer;
: Integer
);
public function SetHVScrollBarPosition(
: int,
: int
);
public: void SetHVScrollBarPosition(
int ,
int
)
public:
void SetHVScrollBarPosition(
int ,
int
)
Parameters
- NewPosH
- The new horizontal coordinate, in pixels, where the horizontal scrollbar is to be moved.
- NewPosV
- The new vertical coordinate, in pixels, where the vertical scrollbar is to be moved.
Example
How to set the scrollbar to its maximum available position to allow to display the bottom right corner of the document.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
If GdViewer1.HScrollVisible OrElse GdViewer1.VScrollVisible Then
GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition())
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
if (GdViewer1.HScrollVisible || GdViewer1.VScrollVisible)
GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition());
Example
How to set the scrollbar to its maximum available position to allow to display the bottom right corner of the document.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
If GdViewer1.HScrollVisible OrElse GdViewer1.VScrollVisible Then
GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition())
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
if (GdViewer1.HScrollVisible || GdViewer1.VScrollVisible)
GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition());
See Also