Cannot get 16x16-dark.png image to show
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Code I wrote expects the 16x16-dark.png image to show when BoolValueInput is selected. Instead I get 16x16.png in a dark blue background. The ScreenCast show the issue but here are some more details. I have a table in which there are 4 lines each with a BoolValueInput configured to work as a CheckBox. All that works great expect when each of the checkboxes are pressed the 16x16-pressed.png image shows up, but when the mouse button is released the images changes to the dark blue selected state but instead of the 16x16-dark.png image it shows the regular 16x16.png image. This is not what the documentation says should happen. What am I doing wrong?
Relevant documentation (from http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-F31C76F0-8C74-4343-904C-68FDA9BB8B4C) says:
Finally, Fusion 360 also needs a version of the image that’s used when the command is active. In this case the button appears depressed and the background is a dark blue. You can create a custom image for this case so that any dark colors don’t disappear into the background. Frequently this is just a copy of the default image. The names of the images to use for the dark background are:
- 16x16-dark.png - 16x16 pixel image showing the image to use with a dark background.
This is the code that adds each of the rows, in the ScreenCast you will see that I have all the relevant images in the folder called RadioButton.
def add_row(self, table, row_id, name, image, initial_value=False): # Create a row table_child_inputs = table.commandInputs _radio_image = os.path.join(PATH, 'resources', 'RadioButton') _radio = table_child_inputs.addBoolValueInput(make_id(row_id), '', True, _radio_image, initial_value) # Add row to the table row = table.rowCount table.addCommandInput(_radio, row, 0)