Toggle Button Highlight Inverted

Hi. I've created a button to toggle whether System/Hidden files are displayed. I'd like for the button to only remain highlighted in gray when System/Hidden files are being displayed. When they're not, I'd like the button to have a neutral background like the rest. However, it's inverted (e.g., it's remaining highlighted when it shouldn't be). I can't seem to figure out a way to inverse this highlighting or turn it off entirely.

Any help would be appreciated.

Thanks.

Unfortunately there's no way currently to do this. I assume you are using the Set HIDEFILTERATTR command to accomplish this. Since it is a "hide filter", the button is highlighted when the filter is active. What you want is for the button to be higlighted when the filter is not active, which is not currently possible.

Yes, that's what I'm using. I tried using Set HIDESYSTEMFILES/K toggle but I got the same results. However, now that you put it this way though I can see why it's behaving as it is. In fact, it's a logical expected behavior.

I'm mildly surprised that there's not an option using SHOWFILTERATTR that would allow you to select files that have no attributes (which, unfortunately, makes the function name a bit misleading) . This way you could tell it to show all files PLUS files that only have a certain attribute set which is ideally what I'm after.

No need to be surprised. As with most "seemingly glaring omissions" from Opus, it's only because no one has ever suggested it. I can't think of everything you know :slight_smile:

I've mentioned this to one of the authors via e-mail who said 'you'll just have to wait' which makes me think it might make it into a future version.

[quote="Randy"]Hi. I've created a button to toggle whether System/Hidden files are displayed. I'd like for the button to only remain highlighted in gray when System/Hidden files are being displayed. When they're not, I'd like the button to have a neutral background like the rest. However, it's inverted (e.g., it's remaining highlighted when it shouldn't be). I can't seem to figure out a way to inverse this highlighting or turn it off entirely.

Any help would be appreciated.

Thanks.[/quote]

Does anyone know if this is possible yet ?

The button below will only display Hidden System files.

Set SHOWFILTERATTR=SH

I use this button:

<?xml version="1.0"?>
<button display="icon" icon_size="large" type="three_button">
	<label>Hidden files</label>
	<icon1>#move</icon1>
	<button display="icon" icon_size="large">
		<label>Hidden files</label>
		<tip>Show hidden files</tip>
		<icon1>#move</icon1>
		<function type="normal">
			<instruction>Set HIDEFILTERATTR</instruction>
		</function>
	</button>
	<button display="icon" icon_size="large">
		<label>Hidden files</label>
		<tip>Don&apos;t show hidden files</tip>
		<icon1>#move</icon1>
		<function type="normal">
			<instruction>Set HIDEFILTERATTR h</instruction>
		</function>
	</button>
</button>
  • Left mouse button click = show hidden files
  • Right mouse button click = don't show hidden files

The button only remains highlighted when System/Hidden files are being displayed: