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, September 19, 2023 8:15:11 AM(UTC)
Satish Trivedi

Groups: Registered
Posts: 5


Using below links we can find active selected annotation which user selected manually, however, how we can set focus on the annotation by code.
By set/get isSelected, it does not focus.
(https://www.leadtools.com/help/sdk/dh/javascript/ac/annobject-isselected.html)
 

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 : Tuesday, September 19, 2023 3:19:47 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 163

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

You can select objects programmatically for automated annotations using selectObject() and selectObjects(). There's more information on the selectObjects() documentation page.
https://www.leadtools.co...ation-selectobjects.html
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Friday, September 22, 2023 12:14:04 AM(UTC)
Satish Trivedi

Groups: Registered
Posts: 5


Thanks Nick,

We have done this using following code

let automationAnnotationForSelect = documentViewer?.annotations.automation;
let allContainers = documentViewer.annotations.automation.containers;
automationAnnotationForSelect.selectObject(allContainers.get_item(documentViewer.get_currentPageNumber()-1).children.get_item(0));

Here documentViewer is object of lt.Document.Viewer.DocumentViewer

This will focus first annotation of active page.
 
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-2024, Yet Another Forum.NET
This page was generated in 0.051 seconds.