Message 1 of 4
How do you change the Size of a Command Dialog Box

Not applicable
03-23-2016
11:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've defined a Command Creation Event as below. I would like to make the dialog box wide enought for the user to read everything but this is the result I get (image). How do I change the size of these boxes, ideally to be dynamically set to the best minimum size.
class CommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler): def __init__(self, inputList): super().__init__() self.inputList = inputList def notify(self, args): try: cmd = args.command cmd.setDialogInitialSize(2000, 2000) onExecute = CommandExecuteHandler()#TODO: could replace this to change up on execute function cmd.execute.add(onExecute) onInputChanged = InputChangedHandler() cmd.inputChanged.add(onInputChanged) # keep the handler referenced beyond this function handlers.append(onExecute) handlers.append(onInputChanged) addInputsToCommand(self.inputList, cmd) except: if ui: ui.messageBox(_('A command created failed: {}').format(traceback.format_exc()))