Author Topic: can autohide panels be triggered independently from each other?  (Read 559 times)

hiccup

  • Hero Member
  • *****
  • Posts: 8013
I am wondering if this is something for a request, or if I am doing something wrong:

I have two different locations that make use of autohide elements.
The first element (contains block #test1) is somewhere at the top, and can be toggled on or of.

The second element, postioned a bit lower, contains two items (block #test2 and block #test3) which can be switched between.

I would imagine these two different autohide locations could operate independent of eachother.
But whenever I toggle location 1 on, location 2 disappears, and when I toggle location 2 on, location 1 disappears.

Is there a way to make these two autohide elements function independently?

a functioning test TM:

Code
<?xml version="1.0" encoding="utf-8"?>
<root>

<autoHide name="#test1" allowPinning="true">
 <element name="#block1" type="block"
 xAnchor="Panel.Left" widthDock="X:Panel.Right"
 yAnchor="Panel.20" heightDock="y:Panel.30" bg="150,150,150"/>
</autoHide>

<autoHide name="#test2" allowPinning="true">
 <element name="#block2" type="block"
 xAnchor="Panel.Left" widthDock="X:Panel.Right"
 yAnchor="Panel.60" heightDock="y:Panel.70" bg="150,0,0"/>
</autoHide>

<autoHide name="#test3" allowPinning="false">
 <element name="#block3" type="block"
 xAnchor="Panel.Left" widthDock="X:Panel.Right"
 yAnchor="Panel.60" heightDock="y:Panel.70" bg="0,150,0"/>
</autoHide>

<element type="Text"
 xAnchor="Panel.Left" x="100" widthDock="X:Panel.Right"
 yAnchor="Panel.10" heightDock="y:Panel.50" font="Segoe UI" size="20" fg="185,185,185"
 onClick="OpenAutoHidePanel:#test1">toggle block 1</element>

<element type="Text"
 xAnchor="Panel.Left" x="100" widthDock="X:Panel.Right"
 yAnchor="Panel.50" heightDock="y:Panel.50" font="Segoe UI" size="20" fg="185,185,185"
 onClick="OpenAutoHidePanel:#test2;OpenAutoHidePanel:#test3">toggle block 2 and 3</element>

</root>

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1139
  • Heal The World
Is there a way to make these two autohide elements function independently?
Haven't properly tested, but OpenFloatingPanel(#id) would be the go-to element for that purpose.
The source code to any of my contributions is available on the same download link as the add-ons

hiccup

  • Hero Member
  • *****
  • Posts: 8013
Haven't properly tested, but OpenFloatingPanel(#id) would be the go-to element for that purpose.
Wouldn't that trigger a floating panel that is detached from the TM window?
Similar to MusicBee's floating window for e.g. lyrics?

I want these panes to be (and stay) integrated, but I will give it a try of course.

hiccup

  • Hero Member
  • *****
  • Posts: 8013
There is some improvement using that.

So 'floating' indeed means something different in a TM than in MusicBee.
The floating panel will stay integrated within the TM. Which is good.

It's now partly working.
I've created a new testing TM:

The element at the top should be be able to simply be toggled on or off.

The element at the bottom should always show either "element A", or toggle to "element B".

What now happens is that the bottom element can indeed be toggled without interfering with the top element.
But as soon as you toggle the top element on, the bottom element disappears again.

Grrr...  ;-)

Code
<?xml version="1.0" encoding="utf-8"?>
<root>

<!-- element A -->

<autoHide name="#element1" allowPinning="true">
 <element type="Text"
 xAnchor="Panel.Left" y="20"
 yAnchor="Panel.15" height="50"
 font="Segoe UI" size="24" fg="200,0,0">element 1</element>
</autoHide>


<element type="Text"
 xAnchor="Panel.Left" width="300"
 yAnchor="Panel.10" height="30" font="Segoe UI" size="14" fg="185,185,185"
 onClick="OpenAutoHidePanel:#element1">toggle element 1 on/off</element>



<!-- element B -->

<autoHide name="#element2a" allowPinning="true">
 <element type="Text"
 xAnchor="Panel.Left" y="20"
 yAnchor="Panel.55" height="50"
 font="Segoe UI" size="24" fg="200,0,0">element A</element>
</autoHide>

<autoHide name="#element2b" allowPinning="true">
 <element type="Text"
 xAnchor="Panel.Left" y="20"
 yAnchor="Panel.55" height="50"
 font="Segoe UI" size="24" fg="0,200,0">element B</element>
</autoHide>


<element type="Text"
 xAnchor="Panel.Left" width="300"
 yAnchor="Panel.50" height="30" font="Segoe UI" size="14" fg="185,185,185"
 onClick="OpenFloatingPanel:#element2a;OpenFloatingPanel:#element2b">toggle to B</element>

</root>

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1290
Bumping for visibility, as I myself have never gotten panels to hide as I wish them to either.