Hybrid Viewer/Selection modes?
Posted: 29 Jan 2008, 18:44
I have no need for a multiple select mode in my application. Is there a way to create a hybrid mode by which a single-click selects the entity the mouse is pointing at, and a drag performs a zoom? I cannot seem to find out how to enable selection mode by code, I can only click the toolbar button
I have tried many methods to get this to work, including...
Nothing I have tried so far can even get me to set it to selection mode to begin with, much less produce the desired effect of the single-click select, drag-to-zoom behavior.
Any ideas would be greatly appreciated - CAD Import .NET is the closest I've come to perfection in my application, yet I need to have it as intuitive and impressive to my boss as possible to get approval to keep working on it as is. I only have a few days left to get all the kinks such as this worked out.
Thanks in advance!
I have tried many methods to get this to work, including...
Code: Select all
Private Sub CADPict_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CADPict.MouseDown
If CADImage.Select(e.X, e.Y) Then
CADPict.Invalidate(CADImage.GetSelectEntityRegion(CADPict.ClientRectangle))
Return
End If
End Sub
Code: Select all
Private Sub CADPict_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CADPict.MouseClick
CADImage.Select(e.X, e.Y)
' etc...
End Sub
Code: Select all
Private Sub LoadFile(ByVal Filename As String)
CAD.LoadFile(Filename)
CAD.ToolsPanelVisible = True
CADPict = CAD.ViewerCADPictureBox
CADImage = CAD.Image
CADImage.SelectionMode = SelectionEntityMode.Enabled
End Sub
Any ideas would be greatly appreciated - CAD Import .NET is the closest I've come to perfection in my application, yet I need to have it as intuitive and impressive to my boss as possible to get approval to keep working on it as is. I only have a few days left to get all the kinks such as this worked out.
Thanks in advance!