[archived content]

Example

import dfl.all;

void main() {
        auto form = new Form;
        form.dockPadding.all = 5;

        auto currentListBox = new ListView;
        currentListBox.dock = DockStyle.FILL;
        form.controls.add(currentListBox);

        currentListBox.items.add("Text 1");
        currentListBox.items.add("Text 2");

        Application.run(form);
}

TODO

items is ListViewItemCollection? ... cant find doc

module dfl.listview;
public class ColumnHeader
{
public final int index; [property getter]
public final ListView listView; [property getter]
public int opCmp(char[] val);
public int opCmp(Object o);
public int opEquals(Object o);
public int opEquals(char[] val);
public final char[] text; [property getter]
public final char[] text; [property setter]
public final HorizontalAlignment textAlign; [property getter]
public final HorizontalAlignment textAlign; [property setter]
public char[] toString();
public final int width; [property getter]
public final int width; [property setter]
}
public class ItemCheckedEventArgs: EventArgs
{
public final ListViewItem item; [property getter]
[+] Inherited members
}
public class LabelEditEventArgs: EventArgs
{
public final bool cancelEdit; [property getter]
public final bool cancelEdit; [property setter]
public final ListViewItem item; [property getter]
public final char[] label; [property getter]
[+] Inherited members
}
public class ListView: Control
{
public final ItemActivation activation; [property setter]
public final ItemActivation activation; [property getter]
public final ListViewItem addRow(char[][] rowstrings...);
public Event afterLabelEdit(ListView,LabelEditEventArgs);
public final bool allowColumnReorder; [property getter]
public final bool allowColumnReorder; [property setter]
public final void arrangeIcons();
public final void arrangeIcons(ListViewAlignment a);
public final bool autoArrange; [property setter]
public final bool autoArrange; [property getter]
public Color backColor; [property getter]
public Color backColor; [property setter]
public Event beforeLabelEdit(ListView,LabelEditEventArgs);
public final void beginUpdate();
public final BorderStyle borderStyle; [property setter]
public final BorderStyle borderStyle; [property getter]
public final bool checkBoxes; [property setter]
public final bool checkBoxes; [property getter]
public final CheckedIndexCollection checkedIndices; [property getter]
public final void clear();
public Event columnClick(ListView,ColumnClickEventArgs);
public final ColumnHeaderCollection columns; [property getter]
protected void createParams(ref CreateParams cp);
public static Color defaultBackColor; [property getter]
public static Color defaultForeColor; [property getter]
protected Size defaultSize; [property getter]
public final void endUpdate();
public final void ensureVisible(int index);
public final int focusedIndex; [property getter]
public final ListViewItem focusedItem; [property getter]
public Color foreColor; [property getter]
public Color foreColor; [property setter]
public final bool fullRowSelect; [property getter]
public final bool fullRowSelect; [property setter]
public final Rect getItemRect(int index);
public final Rect getItemRect(int index,ItemBoundsPortion ibp);
public final bool gridLines; [property setter]
public final bool gridLines; [property getter]
public final bool hideSelection; [property setter]
public final bool hideSelection; [property getter]
public final bool hoverSelection; [property getter]
public final bool hoverSelection; [property setter]
public Event itemChecked(ListView,ItemCheckedEventArgs);
public final ListViewItemCollection items; [property getter]
public final bool labelEdit; [property setter]
public final bool labelEdit; [property getter]
public final bool labelWrap; [property setter]
public final bool labelWrap; [property getter]
public final bool multiSelect; [property setter]
public final bool multiSelect; [property getter]
protected void onAfterLabelEdit(LabelEditEventArgs ea);
protected void onBeforeLabelEdit(LabelEditEventArgs ea);
protected void onColumnClick(ColumnClickEventArgs ea);
protected void onHandleCreated(EventArgs ea);
protected void onItemChecked(ItemCheckedEventArgs ea);
protected void onReflectedMessage(ref Message m);
protected void prevWndProc(ref Message msg);
public final bool scrollable; [property setter]
public final bool scrollable; [property getter]
public final SelectedIndexCollection selectedIndices; [property getter]
public final SelectedItemCollection selectedItems; [property getter]
public final void sort();
public final int delegate(ListViewItem, ListViewItem) sorter; [property getter]
public final int sorter; [property setter]
public final SortOrder sorting; [property getter]
public final SortOrder sorting; [property setter]
public final View view; [property getter]
public final View view; [property setter]
protected void wndProc(ref Message m);
[+] Inherited members
}
public static class ListView.ControlCollection
{
public void add(Control ctrl);
public bool contains(Control ctrl);
public int indexOf(Control ctrl);
public int length; [property getter]
public int opApply(int delegate(ref Control) dg);
public int opIndex; [property getter]
protected final Control owner; [property getter]
public void remove(Control ctrl);
public void removeAt(int i);
}
public enum ListViewAlignment;
public class ListViewItem
{
public final Rect bounds; [property getter]
public final bool checked; [property setter]
public final bool checked; [property getter]
public final int index; [property getter]
public final ListView listView; [property getter]
public int opCmp(Object o);
public int opCmp(char[] val);
public int opEquals(char[] val);
public int opEquals(Object o);
public final bool selected; [property getter]
public final bool selected; [property setter]
public final ListViewSubItemCollection subItems; [property getter]
public final Object tag; [property setter]
public final Object tag; [property getter]
public final char[] text; [property getter]
public final char[] text; [property setter]
public char[] toString();
}
{
public void add(char[] s);
public bool contains(char[] s);
public int indexOf(char[] s);
public void insert(int index,char[] s);
public void remove(char[] s);
}
public class ListViewSubItem
{
public int opCmp(char[] val);
public int opCmp(Object o);
public int opEquals(char[] val);
public int opEquals(Object o);
public final char[] text; [property getter]
public final char[] text; [property setter]
public char[] toString();
}

Page last modified on July 04, 2008, at 04:09 AM