Display Listbox Items Horizontally

0
0

How could i display the items in a list box horizontally like it is in the attached image.

  • You must to post comments
0
0

Hi Nicolas

Wisej kind of supports horizontal ListBox like tihs
in listBox1.InitScript you can use:

this.setOrientation(“horizontal”);
this.setScrollbarX(“on”);

by the way, your sample image doesn’t show an horizontal listbox it shows a flowlayout.

Regards

  • Nicholas
    Thanks Paul for the correction. But i dont seem to know where or how to find the initScript of the listbox. I will be glad if you can pls direct me, and my codes are in vb.net
  • Levie (ITG)
    Hi Nicholas, You should be able to see it in the Property Editor in Visual Studio or directly in code.
  • You must to post comments
0
0

Hi Nicholas,

Please update the InitScript code by adding the following:

var content = this.__content;
content.getLayout().dispose();
content.setLayout(new qx.ui.layout.Flow);

Also, we will be adding a Layout property to the ListBox in Wisej 3.1!

HTH,
Alaa

  • You must to post comments
0
0

Thanks Frank for the directive. But I had wanted to display 2, 3 or 4 rows for the items that flows from right to left. The result for the above code displays only one row for the items, which is not the desired result as can be seen from my first attachment. Is there anyway to fix that pls?

  • You must to post comments
0
0

Nicholas,

the code that Paul posted is in JavaScript and can be added using the editor for the InitScript Property:

initscript

See also:

https://docs.wisej.com/docs/controls/general/common-properties#initscript

Best regards
Frank

 

 

 

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.