This class creates a listview. MUI's listview class is very powerful. It handles various types of entries and multi column lists are also supported, the format for a column is adjustable.
Listviews support any kind of sorting, multi selection and an active entry that can be controlled with the mouse or the cursor keys.
When creating a listview in XML code, you always have to add at least one column to it. This is done by using the Listviewcolumn class. Here is an example of a minimal listview declaration with just a single column:
<listview> <column/> </listview> |
It is also possible to add some entries to the listview right at
declaration time. This can be done by using the <item> tag:
<listview>
<column>
<item>Entry 1</item>
<item>Entry 2</item>
<item>Entry 3</item>
</column>
</listview>
|
The strings you specify using the <item> tag can use text formatting codes.
See Text formatting codes for details.
If you want to have a multi-column list, you need to use the <column> tag
several times. Here is an example:
<listview>
<column title="Column 1">
<item>Entry 1</item>
<item>Entry 2</item>
<item>Entry 3</item>
</column>
<column title="Column 2">
<item>Entry 1</item>
<item>Entry 2</item>
<item>Entry 3</item>
</column>
<column title="Column 3">
<item>Entry 1</item>
<item>Entry 2</item>
<item>Entry 3</item>
</column>
</listview>
|
In this example we have also made use of the Listviewcolumn.Title attribute to add a title bar to each of our columns. There are some more attributes that you can use to customize the appearance of your columns. See Listviewcolumn class for details.