IsRectDrawing Method (GdViewer)
In This Topic
Detects, if the user is drawing the rectangle of area selection.
Please note that the rectangle of selection always relates to the document currently displayed in the GdViewer control. You can find out, if this rectangle is currently defined and drawn within the control, using the IsRect method.
The
RectEditedByUser event is raised when the rectangle has been successfully drawn.
Syntax
'Declaration
Public Function IsRectDrawing() As Boolean
public bool IsRectDrawing()
public function IsRectDrawing(): Boolean;
public function IsRectDrawing() : boolean;
public: bool IsRectDrawing();
public:
bool IsRectDrawing();
Return Value
true if the user is drawing the rectangle of area selection, else false.
Example
How to utilize the fact that a user is drawing the rectangle of area selection.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Sub GdViewer1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
If GdViewer1.IsRectDrawing() Then
'Do your stuff here.
End If
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
void GdViewer1_MouseDown(object sender, MouseEventArgs e)
{
if (GdViewer1.IsRectDrawing())
{
//Do your stuff here.
}
}
Example
How to utilize the fact that a user is drawing the rectangle of area selection.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Sub GdViewer1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
If GdViewer1.IsRectDrawing() Then
'Do your stuff here.
End If
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
void GdViewer1_MouseDown(object sender, MouseEventArgs e)
{
if (GdViewer1.IsRectDrawing())
{
//Do your stuff here.
}
}
See Also