Position of the splitter

PDF-XChange Editor SDK for Developers

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.
Post Reply
AnMuWK
User
Posts: 30
Joined: Thu Dec 19, 2019 2:20 pm

Position of the splitter

Post by AnMuWK »

Hi,

after I have activated the SplitMode (AxPDFXEdit.AxPXV_ControlInst.ExecUICmd("cmd.window.split.vert"), I want to get the position of the splitter.
Is there a way to get to the position of the splitter when it is moved?

Thanks for help.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Position of the splitter

Post by zarkogajic »

Hi,

Out of curiosity: why do you need this?

-žarko
AnMuWK
User
Posts: 30
Joined: Thu Dec 19, 2019 2:20 pm

Re: Position of the splitter

Post by AnMuWK »

For each document we provide a custom toolbar below the document. When a document is splitted, we would then also like to display two toolbars below it. If a splitter is moved the size of the toolbar has to be adjusted as well. Therefore I need the information when the splitter has been moved.
It should be as simple as possible from the user's point of view. But maybe I have to rethink this approach if it makes sense that way.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Position of the splitter

Post by zarkogajic »

Hi

Can you send a screen shot of what you have so far?

How do you add the toolbar?

-žarko
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Position of the splitter

Post by zarkogajic »

Hi AnMuWK,

Are you up to something like this:

image.png

So, for me, on top of each document's pages view (note: there are two PagesView as the document is split vertically) there's a custom command bar with a few commands...

No need to handle splitter movement as the command bar moves with the pages view.


-žarko
AnMuWK
User
Posts: 30
Joined: Thu Dec 19, 2019 2:20 pm

Re: Position of the splitter

Post by AnMuWK »

We use a custom toolbar because it is very different in design from what is in the toolkit.
(This is only a draft and of course not the final version of the toolbar :) )
1.png
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Position of the splitter

Post by zarkogajic »

Hi,

1. IPXV_Control::EnableEventListening ("e.pagesView.ready")
2. Handle IPXV_Control OnEvent for e.pagesView.ready
3. pFrom is IPXV_PagesView
4. Create a class implementing IUIX_ObjImpl for pFrom.Obj
5. Inside IUIX_ObjImpl::OnEvent look for pEvent.Code == WM_SIZE
6. do pSender.QueryImpl for IPXV_PagesView to make sure pSender is PagesView (should be)
7. pSender.ClientRect gives you the coordinates (rectangle) of where the PagesView is within its parent
8. pSender ClientRectToScreen() converts those coordinates to Screen
9. Reposition your toolbar accordingly

10. If you are unsure how to do any of the above: search the forum for samples :)

HTH

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Position of the splitter

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Thanks for the assistance :)

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply