<grouplist> inside list layout
#1
I'm using the following <grouplist> of controls so that the middle <textbox> can have a variable height and the bottom label  will always be just below it regardless of the <textbox>'s text length.

xml:
        
<control type="grouplist">
  <width>600</width>
  <height>600</height>
  <control type="label">
    <width>600</width>
    <height>48</height>
    <font>TitleFont</font>
    <textcolor>TextBright</textcolor>
    <label>$INFO[ListItem.Label]</label>
  </control>
  <control type="textbox">
    <width>600</width>
    <height max="178">auto</height>
    <font>PlotFont</font>
    <textcolor>TextDim</textcolor>
    <align>left</align>
    <aligny>top</aligny>
    <label>$INFO[ListItem.Plot]</label>
    <wrapmultiline>true</wrapmultiline>
  </control>
  <control type="label">
    <width>600</width>
    <height>48</height>
    <font>InfoFont</font>
    <label>$INFO[ListItem.Duration(mm)]mins   $INFO[ListItem.Date]   $INFO[ListItem.VideoResolution]p   $INFO[ListItem.AudioCodec]</label>
  </control>
</control>

This works perfectly when I place the <grouplist> directly in a window.

However it completely fails to display when I place it into a <list>'s <itemlayout> or <focusedlayout>.

Any ideas why it fails, or is there another way to replicate the same effect inside of a layout?
Reply
#2
Lists of any type (grouplist, list, panel, fixedlist, wraplist) do not work inside focus/itemlayout.

What you want to do is not really possible. You could use a [CR] to have a line break after the plot in the textbox label but that's not really the same.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Ok, thanks.
Reply
#4
(2019-12-25, 23:26)jurialmunkey Wrote: Lists of any type (grouplist, list, panel, fixedlist, wraplist) do not work inside focus/itemlayout.

What you want to do is not really possible. You could use a [CR] to have a line break after the plot in the textbox label but that's not really the same.

Why do they not work? I found this PR targeting Nexus, and a few references ones backporting the fixes, but those appear to fix nesting lists themselves, which causes a crash as of Matrix 19.4 and earlier. However, it appears to do exactly the same now that a grouplist does... Nothing. I can add items, but simply not see them.

Is there any workaround for this at all?

Basically, I have a number of strings (set as window properties), that I'd like to display "end to end", but also leveraging visibility conditions. I could easily put them all into a single label, but if one (or more) of them are blank, I just end up with gaps.
Reply
#5
You could try putting each string in an invisible label with id outside the list, then use Control.GetLabel(id) inside the list.

For instance, for the code of the first post it would be:

***outside the list***
<control type="label" id="4000">
<width>1</width>
<height>1</height>
<top>-1000</top>
<left>-1000</left>
<label>$INFO[ListItem.Label]</label>
</control>

***inside the list***
<control type="label">
<width>600</width>
<height>48</height>
<font>TitleFont</font>
<textcolor>TextBright</textcolor>
<label>$INFO[Control.GetLabel(4000)]</label>
</control>

...not sure, but maybe it could work...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply

Logout Mark Read Team Forum Stats Members Help
<grouplist> inside list layout0