Properties > Label > Color button

I need some help creating a small button bar that will allow me to quickly use the Properties > Label > Color selection for files. At present, to apply a color to a file, I have to click the arrow on the Properties button, scroll down to Set Label, then scroll over and down to the color I want to select. It would save me a lot of time if I could just have several buttons for the colors I've been assigning to files. I tried to figure out how to apply that to a button, but I was unable to figure out how to do so.

The Properties command will handle this, like so:

@nodeselect 
Properties SETLABEL=Purple
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
	<label>SETLABEL Purple</label>
	<icon1>#newcommand</icon1>
	<function type="normal">
		<instruction>@nodeselect </instruction>
		<instruction>Properties SETLABEL=Purple</instruction>
	</function>
</button>

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Properties.htm

You can also generate a list of all colors from a single button, if you don't want to make individual buttons for specific colors. (Which is best depends on what you want.)

Properties SETLABEL LABELCATEGORY raw:~(Status)

(The LABELCATEGORY raw:~(Status) part tells it to exclude status icons from the list, so you only get normal labels.)

This is the same command that is in the Properties drop-down menu, just with the !menu parameter removed, so it adds the buttons where it is instead of creating a sub-menu for them.

1 Like

Excellent! Thanks for the help. I'll play around with each of those suggestions and see which works best for me. I knew that there had to be an easy way...

1 Like