Message 1 of 4
Not applicable
05-06-2015
03:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have another problem, this time with UI.
I'm making my own tool bar panel with single command button.
The problem is that when I set isPromoted value to True button appears in the Panel but it's empty. No icon, no tool tip, no action assigned to it. Just empty placeholder.
When I disable isPromoted then command button is availabe when I click on small arrow and it works as expected.
Is there any way to fix this and have button displayed in the panel?
buttonTheaExport = cmdDefs.addButtonDefinition('TheaExportDefIdPython', 'Export to Thea',
'Export to Thea',
'.//Resources//theaExport')
# Connect the command created event.
TheaExportCommandCreated = TheaExportCommandCreatedEventHandler()
buttonTheaExport.commandCreated.add(TheaExportCommandCreated)
handlers.append(TheaExportCommandCreated)
# Create new panel
theaPanel = ui.toolbarPanels.add('theaPanelId', 'Thea Render')
exportControl = theaPanel.controls.addCommand(buttonTheaExport, 'TheaExportCmdDefControl')
exportControl.isPromoted = True
exportControl.isPromotedByDefault = True
Solved! Go to Solution.