Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get values of other columns in a ListBox?

Explorer ,
Apr 23, 2019 Apr 23, 2019

Hi.

I have a multicolumn listbox with several values.

    var fontsList = fontsPanel.add("listbox", undefined, undefined, {

        numberOfColumns: 2,

        showHeaders: true,

        columnTitles: ["Font    ", "Usage    "],

        multiselect: true

        //columnWidths: [350, 50, 200, 100]

    });

     var lItem = fontsList.add("item", "test");

     lItem.subItems[0].text = "test 1";

I can access the first columns values using

fontsList.items;

But how can I get the array with the second column items? I am trying this but ins't working

fontsList.subItems[0];

Can anyone help please?

TOPICS
Scripting
781
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 23, 2019 Apr 23, 2019

Try this:

fontsList.items[0].subItems[0].text

P.

Translate
Community Expert ,
Apr 23, 2019 Apr 23, 2019

Try this:

fontsList.items[0].subItems[0].text

P.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 24, 2019 Apr 24, 2019
LATEST

Thank you do much Peter, it worked!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines