Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help: Set Button Size with Large Size in Default

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ngnam1988
223 Views, 2 Replies

Help: Set Button Size with Large Size in Default

Dears,

I'm a new in API with VS. Please help me how to set the Button Size in the Ribbon Tab with large size in default or large size only?  - I'm using this code.  (In this case I wanna some button always in large size = "LargeIcon_32x32")

Dim oCtrlDefs As ControlDefinitions = m_inventorApplication.CommandManager.ControlDefinitions
mButtonDef = oCtrlDefs.AddButtonDefinition( _
		"Custom Cmd", _
		"Company:AddInName:Button1", _
		CommandTypesEnum.kQueryOnlyCmdType, _
		"AddInGuid", _
		"Description", _
		"Tolltip text", _
		StandardIcon_16x16, _
		LargeIcon_32x32, _
		ButtonDisplayEnum.kDisplayTextInLearningMode)

Thanks you!

Tags (1)
2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: ngnam1988

In the code that you shared the ControlDefinition is defined. The button size is a property of the CommandControl. in your code you should have something like this:

Dim ribbon As Ribbon = _inventor.UserInterfaceManager.Ribbons.Item("Assembly")
Dim ribbonTab As RibbonTab = ribbon.RibbonTabs.Item("id_TabManage")
Dim ribbonPanel As RibbonPanel = ribbonTab.RibbonPanels.Item("iLogic.RibbonPanel")
Dim control As CommandControl = ribbonPanel.CommandControls.AddButton(mButtonDef)
control.UseLargeIcon = True

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
ngnam1988
in reply to: ngnam1988

Thank you very much! @JelteDeJong 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report