getmusicbee.com

Support => Developers' Area => TheaterMode => Topic started by: sleepless on February 02, 2016, 02:56:01 PM

Title: Setting constraints not consistant
Post by: sleepless on February 02, 2016, 02:56:01 PM
Please bear with me here as I'm completely new to this stuff. Could someone explain why it is that when an object is anchored to the panel edge, a constraint works fine. However if the anchor is the Panel.Center or a Panel.% the constraint doesn't work (object extends all the way to the end). Here's 2 examples:

1. works:<element  type="Block"  xAnchor="Panel.Left" x="0" yAnchor="Panel.Center" y="0"  widthDock="Panel" width="-50" height="20" bg="250,0,250" ></element>
  fails:<element  type="Block"  xAnchor="Panel.Center" x="0" yAnchor="Panel.Center" y="0"  widthDock="Panel" width="-50" height="20" bg="250,0,250" ></element>

2. works:<element  type="Block"  xAnchor="Panel.Center" x="0" yAnchor="Panel.Top" y="0"  width="20" heightDock="Panel" height="-50" bg="0,0,250" ></element>
    fails:   <element  type="Block"  xAnchor="Panel.Center" x="0" yAnchor="Panel.20" y="0"  width="20" heightDock="Panel" height="-50" bg="0,0,250" ></element>

Here are the 2 that work:
(http://s15.postimg.org/i1fv0su2v/test_1.jpg) (http://postimg.org/image/i1fv0su2v/)

and the 2 that don't:
(http://s23.postimg.org/mpd2havo7/test_2.jpg) (http://postimg.org/image/mpd2havo7/)

This issue is causing me a lot of problems in trying to create a new TM.xml.  Any help here would me much appreciated.

EDIT:

I realized that using the prefix X: or Y: when setting the widh/heightDock value works, BUT if there is an align="" command (the sme element from the opposite side panel), the object doesn't appear at all.

works:<element  type="Block"  xAnchor="Panel.20" x="0" yAnchor="Panel.Center" y="0"  widthDock="X:Panel.Right" width="-50" height="20" bg="250,0,250" ></element>
fails: <element  type="Block"  xAnchor="Panel.80" x="0" yAnchor="Panel.Center" y="0"  widthDock="X:Panel.Left" width="-50" height="20" align="Top.Right" bg="250,0,250" ></element>
Title: Re: Setting constraints not consistant
Post by: redwing on February 02, 2016, 03:30:19 PM
Instead of

widthDock="Panel"
heightDock="Panel"

use

widthDock="X:Panel.Right"
heightDock="Y:Panel.Bottom"
Title: Re: Setting constraints not consistant
Post by: sleepless on February 02, 2016, 03:35:52 PM
ha, yeah i figured that out (just edited my original post) but now a new problem: align commands result in no object being displayed at all. (see above)
Title: Re: Setting constraints not consistant
Post by: redwing on February 02, 2016, 04:05:47 PM
Looks like it only works with a fixed value of width with that align setting.
FYI there are many flaws and limitations with TM elements because only a few work on this and this is a very low priority in Steven's to-do list.
If you need a new element or a fix for existing elements, post such a wish and wait (sometimes for months and years).