Hide label next to button input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to add a "refresh" button that refreshes the items in a dropdown control in a command I've created (these items are sourced from an external platform). That's fairly easy to do by calling command.commandInputs.addBoolValueInput('refresh', 'Refresh', False, '') and then listening for the input changed event that's triggered when the user clicks the button.
The trouble is, "refresh" is shown both to the left of, and on, the button:
I think it would better if it were only shown on the button, and not as a field label to the left of the button. (This is doubly true if I need to use a longer caption, like "Reset to Defaults" or something.)
I can't figure out how to do that. Setting the name to the empty string, then setting the button text has no effect (the field label immediately adopts the same text):
refresh_button = command.commandInputs.addBoolValueInput('refresh', '', False, '')
refresh_button.text = 'Refresh'
Setting the button to full width works, but then it doesn't line up with the rest of the controls (presumably because it's trying to center it, but it doesn't look good):
refresh_button = command.commandItems.addBoolValueInput('refresh', 'Refresh', False, '')
refresh_button.isFullWidth = True
What else can I try?
Thanks!