Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks) SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hi Support,
Is there a way to quickly check if "bookmarksView.ensureVisibility" is "on" for a document's BookmarksView ?
What I'm doing right now: iterating over BookmarksView.CmdPaneTop's IUIX_CmdLines/IUIX_CmdBars, looking for (first) 'cmd.bookmarksView.ensureVisibility' command item and checking if UIX_CmdItemState_Checked is in its State.
Also: what's the real difference between what the following two commands do: "cmd.bookmarksView.autoExpandBookmarks" and "cmd.bookmarksView.ensureVisibility" ?
If bookmarksView.autoExpandBookmarks is "off" and "bookmarksView.ensureVisibility" is "on" -> moving through pages will still expand bookmarks and make the corresponding one visible.
-žarko
Is there a way to quickly check if "bookmarksView.ensureVisibility" is "on" for a document's BookmarksView ?
What I'm doing right now: iterating over BookmarksView.CmdPaneTop's IUIX_CmdLines/IUIX_CmdBars, looking for (first) 'cmd.bookmarksView.ensureVisibility' command item and checking if UIX_CmdItemState_Checked is in its State.
Also: what's the real difference between what the following two commands do: "cmd.bookmarksView.autoExpandBookmarks" and "cmd.bookmarksView.ensureVisibility" ?
If bookmarksView.autoExpandBookmarks is "off" and "bookmarksView.ensureVisibility" is "on" -> moving through pages will still expand bookmarks and make the corresponding one visible.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hello zarkogajic,
That way is OK for finding out the checked state.
The Auto Expand property won't always show the bookmark itself, although the parents will be opened. The ensure visibility makes sure that you will be seeing the bookmark itself in the Bookmarks View.
Cheers,
Alex
That way is OK for finding out the checked state.
The Auto Expand property won't always show the bookmark itself, although the parents will be opened. The ensure visibility makes sure that you will be seeing the bookmark itself in the Bookmarks View.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hi Alex,
Ok, thanks.
Anyhow, no faster / more direct way to check than iterating and finding the command item and its state?
That's probably not how you do it internally
-ž
Ok, thanks.
Anyhow, no faster / more direct way to check than iterating and finding the command item and its state?
That's probably not how you do it internally
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hello zarkogajic,
Totally forgot about this...
You can just check these settings "BookmarksView.AutoExpandBookmarks", "BookmarksView.EnsureVisibility".
Cheers,
Alex
Totally forgot about this...
You can just check these settings "BookmarksView.AutoExpandBookmarks", "BookmarksView.EnsureVisibility".
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hi Alex,
Thanks. That's it.
p.s.
Aha - that's a global setting - not per document. ok.
p.s.2
Then "BookmarksView.ShowInfoBar" also does this: viewtopic.php?f=66&t=34208
-žarko
Thanks. That's it.
p.s.
Aha - that's a global setting - not per document. ok.
p.s.2
Then "BookmarksView.ShowInfoBar" also does this: viewtopic.php?f=66&t=34208
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hello zarkogajic,
Yup
Cheers,
Alex
Yup
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hi Alex,
When setting
Inst.Settings['BookmarksView.EnsureVisibility'].v = true / false
do I need to call Inst.FireAppPrefsChanged? If so, with what parameters?
Or is Inst.FireAppPrefsChanged only to be called when changing settings that appear on the "Preferences..." dialog?
The thing is: when I change the 'BookmarksView.EnsureVisibility' from code, the command item (cmd.bookmarksView.ensureVisibility) does not reflect the new value (its state is not changed from normal to checked (and opposite).
-ž
When setting
Inst.Settings['BookmarksView.EnsureVisibility'].v = true / false
do I need to call Inst.FireAppPrefsChanged? If so, with what parameters?
Or is Inst.FireAppPrefsChanged only to be called when changing settings that appear on the "Preferences..." dialog?
The thing is: when I change the 'BookmarksView.EnsureVisibility' from code, the command item (cmd.bookmarksView.ensureVisibility) does not reflect the new value (its state is not changed from normal to checked (and opposite).
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hello zarkogajic,
The e_bookmarks_ensureVisibility event needs to be fired - thus all of the Bookmark Views will be updated.
Cheers,
Alex
The e_bookmarks_ensureVisibility event needs to be fired - thus all of the Bookmark Views will be updated.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hi Alex,
Thanks, this seems to work.
Btw, "e.bookmarks.ensureVisibility" is not listed here https://sdkhelp.pdf-xchange.com/vi ... PXV_Events
When creating the event via Inst.EventServer.CreateNewEvent, can I use nParam1 and/or nParam2 to specify the needed value for 'BookmarksView.EnsureVisibility' ?
Or, I have to go with 2 lines every time I want to change the setting:
-ž
Thanks, this seems to work.
Btw, "e.bookmarks.ensureVisibility" is not listed here https://sdkhelp.pdf-xchange.com/vi ... PXV_Events
When creating the event via Inst.EventServer.CreateNewEvent, can I use nParam1 and/or nParam2 to specify the needed value for 'BookmarksView.EnsureVisibility' ?
Or, I have to go with 2 lines every time I want to change the setting:
Code: Select all
Inst.Settings['BookmarksView.EnsureVisibility'].v := true/false
Inst.EventServer.FireEvent(IEvent(e_bookmarks_ensureVisibility), Inst); //note: some pseudo code
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Hello zarkogajic,
Those two lines are needed - the event is being caught and then the Settings values is being read.
Cheers,
Alex
Those two lines are needed - the event is being caught and then the Settings values is being read.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Check if "bookmarksView.ensureVisibility" is ON (and vs. bookmarksView.autoExpandBookmarks)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ