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!
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
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.
Blog: hjalte.nl - github.com
Can't find what you're looking for? Ask the community or share your knowledge.