Reply

Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

Am i able to create a custom named TAB (not named Addin) with macro API ??

CAN'T manage it !  speakin vb.net  --only 2 add a Group under a Tab named (by SE) "Addin"

Does anyone know how 2 do it or do i always need a addin doing this - with ST

(with previous verions - no problem)

 

Posted by: Linus Hechinger
Post date: 8/25/2009 12:20:47 AM

14 REPLIES

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

Yes you can create custom tabs.  I was given an example addin, done in VB6, from UGS that shows how to do it. Unzip and run the regaddin.bat.  If that doesn't register, you will have to assign it a new clsid.  I can walk you through that if you need help.

I have figured out how to modify the buttons to show the icon and the description, but have not yet figured out how to create seperators or large icons.

 

Posted by: Kevin Haen
Post date: 8/26/2009 2:38:26 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

TOP ! THANX for this !

good documentation in the source, too.

 

I also made a call to ugs, if its possible from outside by macro api, lets see...

but i think i'll do it with an addin, too...

if someone has news how to make big buttons, we all would be very happy

(mentioned it also in my call...)

and if its vb.net i would be even happier

 

Posted by: Linus Hechinger
Post date: 8/26/2009 3:33:21 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

Here is the documentation for large icons.  I just can't VB to recognize these new options.

 

 

With MP7 of ST (version 100), new button styles have been added. Recall that a CommandBarButton API is returned from AddCommandBarButton. The API has a Style property. New styles have been added with MP7.

 

One of the new styles is used to support having the larger, 32X32 icon associated with a command. Failure to use the new style when trying to create a large button image will result in the larger image being downsized to 16X16.

·         seButtonIconAndCaptionBelow – This style will cause Edge to place the text of a button below the icon. This style MUST be used for any command that wants to use a large icon.

·         seCheckButton – This style will cause Edge to create a check button. Edge does not provide direct support for checking/unchecking the button. Edge will fire the OnCommand event when the button is clicked. In order to set the check state, the add-in should respond to the OnCommandUpdateUI event and set (to “check”) the seCmdActive_Checked bit of the “lCmdFlags” argument. Failure to set this bit will result in the button being/remaining unchecked. To remain checked, set the bit on each call to OnCommandUpdateUI (failure to do so results in the button being unchecked.)

·         seCheckButtonAndIcon – This style is analogous to seCheckButton except that instead of text, an icon is displayed with the button. Of course the icon must have been passed to edge via a call to SetAddInInf(Ex).

·         seRadioButton – This style will cause Edge to create a radio button. The state of a radio button is set in the same way a check button is set. That is, using the seCmdActive_Checked bit of lCmdFlags.

 

Posted by: Kevin Haen
Post date: 8/26/2009 3:55:25 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

thanx - I'll try it out ...

 

Posted by: Linus Hechinger
Post date: 8/26/2009 4:01:16 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

I was running ST MP8 and could not get it to work.  Installed MP9 and it works just fine.  Now VB understands all the new styles.  I now have large icons.  Let me know if you get stuck, I will walk you through what ever you need.

The command to change to big icons is:

m_Commands.m_CommandButton.Style = seButtonIconAndCaptionBelow

Put this command under the command to loadface, and make sure the icon is 32x32.  The example icon is a strange size, not 32x32.

 

Posted by: Kevin Haen
Post date: 8/26/2009 4:12:17 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

got a problem with the vb6 example with converting it to .net - with the line

m_Commands.m_myAddIn.SetAddInInfo(VB6.GetHInstance.ToInt32, ......and so on)

how to convertit to vb.net cause there's no VB6. class ;(

what does VB6.GetHInstance.ToInt32 do ? is there anouther workaround with vb.net addin ??

 

 

Posted by: Linus Hechinger
Post date: 8/26/2009 11:35:44 PM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

GOT it

'get HINSTANCE

Dim m As System.Reflection.Module

Dim t As Type = GetType(Connect)

 

m = t.Module

 

Dim hinstance As Int32

hinstance = Marshal.GetHINSTANCE(m).ToInt32

 

 

 

Posted by: Linus Hechinger
Post date: 8/27/2009 12:12:53 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

Large Buttons WORKING - but all greyed out 

am I wrong - or doesn't it work with MP9 ?

OnAction string is there, and also in the objects ...  mmhhh

see small test-addin (based on previeous post, slightly edited)  -- attached  (vb.net & vs2005)

 

 

Posted by: Linus Hechinger
Post date: 8/27/2009 4:12:44 AM

RE: Se ST 1 MP7 - Add Custom Named TAB with Macro API - POSSIBLE??

[ Edited ]

 

Unremark line 39'm_addinEvents = AddInInstance.AddInEvents

 

Posted by: Jason Newell
Post date: 8/27/2009 4:23:28 AM