Hi Support,
I'm programmatically injecting a check box to the SearchView pane (between Search and Options buttons) :
What style should I set for that IUIX_Label so that "btn.options" never goes over it, when the full dlg width is small?
Much like how it does not go over the "btn.startStop", and always renders "after" it (check box hidden now):
Edit1:
Also, how do I force a Tooltip to display for that Label?
-žarko
Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
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: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
Hello zarkogajic,
How are you "injecting" it exactly?
Cheers,
Alex
How are you "injecting" it exactly?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
Hi Alex,
1. Get IPXV_SearchView from MainFrame.View.Panes
2. Get IUIX_Dialog from it
3. Get "btn.startStop" IUIX_Button on it
4. IUIX_Inst.CreateLabel having IUIX_Dialog [2] as parent
5. Push custom IUIX_ObjImpl for the "btn.startStop" button
6. In button's e_Render read its Rect
6.1. "Move" rect to the right
6.2. Set label's rect (so it is next/right to that button).
Works like a charm
What I could do is to also move "btn.options" to the right of label's rect - and I think that could work - but I was hoping for some style setting or something like that - as I do not like this moving/repositioning in "btn.startStop" e_Render.
p.s.
I'm also setting Tooltip for the label - but am not sure how to force its display.
-ž
1. Get IPXV_SearchView from MainFrame.View.Panes
2. Get IUIX_Dialog from it
3. Get "btn.startStop" IUIX_Button on it
4. IUIX_Inst.CreateLabel having IUIX_Dialog [2] as parent
5. Push custom IUIX_ObjImpl for the "btn.startStop" button
6. In button's e_Render read its Rect
6.1. "Move" rect to the right
6.2. Set label's rect (so it is next/right to that button).
Works like a charm
What I could do is to also move "btn.options" to the right of label's rect - and I think that could work - but I was hoping for some style setting or something like that - as I do not like this moving/repositioning in "btn.startStop" e_Render.
p.s.
I'm also setting Tooltip for the label - but am not sure how to force its display.
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
Hello zarkogajic,
The thing is that the Label that you are adding appears with the topmost position - this it overlaps everything.
Try creating it like this:
The UIX_CreateObj_InsertBefore flag should insert it as a first item, not last.
Cheers,
Alex
The thing is that the Label that you are adding appears with the topmost position - this it overlaps everything.
Try creating it like this:
Code: Select all
UIX_CreateObjParams cp;
cp.pParent = pParent;
cp.nStdClass = UIX_StdClass_Label;
cp.nObjStyle = nStyle;
cp.nCreateFlags = UIX_CreateObj_InsertBefore;
cp.pID = pID;
cp.pImpl = pCustomImpl;
cp.rc = pRect;
IUIX_Obj obj = uiInst.CreateObj(ref cp);
IntPtr outPtr;
obj.Parent.QueryImpl(typeof(PDFXEdit.IUIX_Label).GUID, null, out outPtr);
PDFXEdit.IUIX_Label label = (PDFXEdit.IUIX_Label)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
Hi Alex,
This ends up with the same result:
BUT also:
Btw, having nCreateFlags = UIX_CreateObj_InsertBefore - what do you specify for "nInsertBefore" ?
-žarko
This ends up with the same result:
BUT also:
Btw, having nCreateFlags = UIX_CreateObj_InsertBefore - what do you specify for "nInsertBefore" ?
-žarko
Last edited by zarkogajic on Thu Jun 04, 2020 1:23 pm, edited 1 time in total.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
Hello zarkogajic,
Ah, forgot to mention that - the nInsertBefore field - try setting it to 0 for example.
Probably that's why it didn't work.
Cheers,
Alex
Ah, forgot to mention that - the nInsertBefore field - try setting it to 0 for example.
Probably that's why it didn't work.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Adding/injecting IUIX_ObjImpl (Label) onto an IUIX_Dialog
H Alex,
Tried with 0 and 1 and -1. Always the same.
I believe something special is going on behind the scenes as the Options button is always aligned to the right - but never goes over Start/Stop button.
-žarko
Tried with 0 and 1 and -1. Always the same.
I believe something special is going on behind the scenes as the Options button is always aligned to the right - but never goes over Start/Stop button.
-žarko