Forum Discussion

tmm1's avatar
tmm1
Channel Surfer
8 years ago

ListPanel inside OverhangPanelSetScene not showing leftLabel or rightLabel

I created a simple ListPanel inside a OverhangPanelSetScene, then created a LabelList child and populated it with some entries. The LabelList shows up fine, but the leftLabel and rightLabel above it do not.

I also tried to use showSectionLabels=true with sectioned content inside my LabelList, but since leftLabel is not showing up I can't see the section titles either.

4 Replies

  • tmm1's avatar
    tmm1
    Channel Surfer
    Can anyone else confirm or deny that they see this problem?

    Here's an example panel:

    <?xml version="1.0" encoding="utf-8" ?>
    <component name="NavPanel" extends="ListPanel">
      <script type="text/brightscript">
        <![CDATA[
          sub init()
            m.top.overhangTitle = "Test"
            m.top.leftLabel.text = "hello"
            m.top.rightLabel.text = "world"

            list = m.top.createChild("LabelList")
            list.vertFocusAnimationStyle = "floatingFocus"

            m.content = createObject("RoSGNode","ContentNode")
              addSection("Section 1")
              addItem("Item 1")
              addSection("Section 2")
              addItem("Item 2")
              addItem("Item 3")
            list.content = m.content

            m.top.list = list
          end sub

          sub addSection(sectiontext as string)
            m.sectionContent = m.content.createChild("ContentNode")
            m.sectionContent.CONTENTTYPE = "SECTION"
            m.sectionContent.TITLE = sectiontext
          end sub

          sub addItem(itemtext as string)
            item = m.sectionContent.createChild("ContentNode")
            item.title = itemtext
          end sub
        ]]>
      </script>
    </component>
  • Were you still experiencing this issue?

    I ran the component example you posted above within the Scenegraph tutorial app, and I'm able to see both labels above the highlighted item in the listpanel.

    Could you send a screenshot of what's on your screen?
  • tmm1's avatar
    tmm1
    Channel Surfer
    Thanks a lot for confirming it works for you!

    I figured out the problem.. the color of the text was the same as the background, so it wasn't visible.
  • tmm1's avatar
    tmm1
    Channel Surfer
    So setting the leftLabel or rightLabel to some specific text definitely works. But if I leave them blank, and set

            m.top.showSectionLabels = true

    then the leftLabel is not automatically populated like the documentation suggests.