Hi Support,
What event to catch when a new tab group is created via cmd.window.activeDocToNewHorzTabGroup or cmd.window.activeDocToNewVertTabGroup ?
In details: I'm allowing tabs for documents but am hiding "add new tab", "close active tab", etc... so when I have two documents open, here's how it looks:
If I then call any of activeDocToNewHorzTabGroup or activeDocToNewVertTabGroup the result is as:
The newly created tab group has the removed buttons (UIX_LayoutItemStyleFlags).
Now, I can re-hide those add/close buttons using ModifyLayoutItemContainersStyle BUT I do not know when to do that - I need an event when the above happens so I can fix.
p.s.
ModifyLayoutItemContainersStyle from https://forum.pdf-xchange.com/viewtopic.php?f=66&t=34707&p=144884&hilit=ModifyLayoutItemContainersStyle#p144884
-žarko
Event for New Tab Group 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
Re: Event for New Tab Group
Hi Support,
To provide some more info here..
I can custom handle those two commands (UIX_CmdNotify_Exec) and I can then call the code I need to fix the layout item. And that's what I do atm.
If the new tab group can be created in different means (?) than executing those two commands -> then what I'm looking for is something like custom IUIX_ObjImpl OnEvent/e_Notify for IPXV_DocumentViewsArea and be notified when the new tab group is created. Something like UIX_Notify_Layout_Item_NewPanesRootItem.
p.s.
Btw, I would expect the newly created tab group (IUIX_LayoutItem) to inherit the Style values from its "ancestor" (Root).
-žarko
To provide some more info here..
I can custom handle those two commands (UIX_CmdNotify_Exec) and I can then call the code I need to fix the layout item. And that's what I do atm.
If the new tab group can be created in different means (?) than executing those two commands -> then what I'm looking for is something like custom IUIX_ObjImpl OnEvent/e_Notify for IPXV_DocumentViewsArea and be notified when the new tab group is created. Something like UIX_Notify_Layout_Item_NewPanesRootItem.
p.s.
Btw, I would expect the newly created tab group (IUIX_LayoutItem) to inherit the Style values from its "ancestor" (Root).
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Event for New Tab Group
Hi Zarko.
You may intercept one notify which UI-framework sends to the "documentViewsArea" UI-object
HTH.
You may intercept one notify which UI-framework sends to the "documentViewsArea" UI-object
Code: Select all
if (event.nCode == e_Notify)
{
UIX_NotifyInfo* notify = (UIX_NotifyInfo*)event.nParam1;
if (notify.nCode == UIX_Notify_Layout_Changed && notify.nFromID == Str2ID( "documentViewsArea"))
{
if ((int)notify.pData & UIX_LayoutChanged_ItemsAdded)
// documentViewsArea-layout is changed: some tabs/panes has been added...
}
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Event for New Tab Group SOLVED
Vasyl,
Thanks!
-žarko
Thanks!
-žarko
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: