Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, May 23, 2006 8:21:57 AM(UTC)
dvGodard

Groups: Registered
Posts: 7


Hello,
I would like to know if it's possible to remove the possibility to select several AnnObject in an automation manager. I've seen the MultiSelectModifierKey property to prevent from selecting several objects with the shift key.

Can anyone help me please ?

Thank you very much,

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, May 28, 2006 12:10:45 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

You are right. To stop the multi-select ability you need to disable the AnnAutomationManager.MultiSelectModifierKey Property as follows:
+---------------------+
manager.MultiSelectModifierKey = Keys.None
+---------------------+

Please let me know if I can be of further assistance.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Sunday, May 28, 2006 11:14:44 PM(UTC)
dvGodard

Groups: Registered
Posts: 7


Thank you for your answer.

But I would like to know if it's possible to remove the multiselection with the mouse when I select several objects. By default, It's creates an AnnGroupObject but I don't want this kind of object.

How can I do without that ?

Thank you,
 
#4 Posted : Tuesday, June 6, 2006 5:03:07 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

You may try doing this by controlling the AnnGroupEditDesigner. You need to handle the AnnAutomation.BeforeObjectChanged event.
The code will be something as follows (I didn't try to use the following code, but you can make use of it):
+------------------------+
...
AddHandler AutomationAnn.BeforeObjectChanged, AddressOf automation_BeforeObjectChanged
...
Private Sub automation_BeforeObjectChanged(ByVal sender As Object, ByVal e As Leadtools.Annotations.AnnBeforeObjectChangedEventArgs)
Dim autiomation As AnnAutomation

autiomation = DirectCast(sender, AnnAutomation)

If (Not IsNothing(autiomation.CurrentDesigner) AndAlso TypeOf (autiomation.CurrentDesigner) Is AnnGroupEditDesigner) Then
Dim EditDesigner As AnnGroupEditDesigner = DirectCast(autiomation.CurrentDesigner, AnnGroupEditDesigner)
AddHandler EditDesigner.Edit, AddressOf AnnEditDesigner_Edit
End If
End Sub
...
Private Sub AnnEditDesigner_Edit(ByVal sender As Object, ByVal e As Leadtools.Annotations.AnnEditDesignerEventArgs)
e.Cancel = True
e.Object.Group = Nothing
End Sub
+------------------------+

Please let me know how it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.150 seconds.