-
Re: PropertyManagerPage TABS re-alignment.
Anup Kholgade Sep 21, 2016 10:03 AM (in response to Anup Kholgade)Please. let me know if above is possible...
-
Re: PropertyManagerPage TABS re-alignment.
Artem Taturevych Sep 21, 2016 6:58 PM (in response to Anup Kholgade)You probably need to go with the custom User Control so you can align controls as you want. Take a look at 2013 SOLIDWORKS API Help - IPropertyManagerPageActiveX Interface
-
Re: PropertyManagerPage TABS re-alignment.
Anup Kholgade Sep 23, 2016 2:29 PM (in response to Artem Taturevych)I tried you suggestion and tried to add a "tabstrip" using MSComctlLib.TabStrip.
But it fails to to initialize, and object would not form. The code is as below...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
controlType = (int)swPropertyManagerPageControlType_e.swControlType_ActiveX;
align = (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge;
options = (int)swAddControlOptions_e.swControlOptions_Enabled |
(int)swAddControlOptions_e.swControlOptions_Visible;
activexcntr = (IPropertyManagerPageActiveX)group2.AddControl(activeXId, controlType, "ActiveX", align, options, "");
activexcntr.SetClass("MSComctlLib.Tab", "");
//MSComctlLib.TabStrip tabstrip = default(MSComctlLib.TabStrip);
//tabstrip = (MSComctlLib.TabStrip)activexcntr.GetControl();
MSComctlLib.Tab tab = (MSComctlLib.Tab)activexcntr.GetControl();
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The "tab" object is always null here. I have "Interop.MSComctlLib.dll" in references.
If you can refer to any good example that would be good. I tried below link.
2016 SOLIDWORKS API Help - Add ActiveX Tabs to FeatureManager Design Tree Example(C#)
Also tried something else with using standard "Windows.Forms"
Check image below, highlighted part is the IPropertyManagerPageWindowFromHandle.
But it's not stable, once I close the Property Manager Page and reopen, it disappears.
-
-
-
Re: PropertyManagerPage TABS re-alignment.
Peter Brinkhuis Sep 21, 2016 2:56 PM (in response to Anup Kholgade)I have checked the documentation as well. I could only find references to creating Groups inside tabs. Not the other way around.
So let's start the other way around. Do you need that many controls that you need the tabs? Users usually get lost when there are too many buttons. Just really make sure you need them. There are built-in option for next and previous buttons if you do, maybe that's an option.
-
Re: PropertyManagerPage TABS re-alignment.
Anup Kholgade Sep 23, 2016 2:30 PM (in response to Peter Brinkhuis)Yes TABS are required. Can not avoid them.
-
-
Re: PropertyManagerPage TABS re-alignment.
Anup Kholgade Sep 22, 2016 7:52 AM (in response to Anup Kholgade)Yes TABS are required. Can not avoid them.
Also tried Artem's suggestion, there is an example on how to add ActiveX control under
But not sure how to have it on PropertyManagerPage.
-
Re: PropertyManagerPage TABS re-alignment.
Anup Kholgade Sep 28, 2016 9:06 AM (in response to Anup Kholgade)Okay Windows.Forms.Form and swControlType_WindowFromHandle,
combination is working for me. So closing this query.