[archived content]

About

A ComboBox? is also sometimes called a dropdown menu.

Usage

All the items of a ComboBox? are identified by the item property. Images are not supported, only text.

Example

import dfl.all;

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

        auto currentComboBox = new ComboBox;
        currentComboBox.dock = DockStyle.FILL;
        form.controls.add(currentComboBox);

        auto currentLabel = new Label;
        currentLabel.text = "Label!";
        currentComboBox.items.add(currentLabel);

        Application.run(form);
}

module dfl.combobox;
public class ComboBox: ListControl
{
public final void beginUpdate();
public void createHandle();
protected ObjectCollection createItemCollection();
protected void createParams(ref CreateParams cp);
public const int DEFAULT_ITEM_HEIGHT;
protected Size defaultSize; [property getter]
public Event drawItem(ComboBox,DrawItemEventArgs);
public final DrawMode drawMode; [property getter]
public final DrawMode drawMode; [property setter]
public final ComboBoxStyle dropDownStyle; [property setter]
public final ComboBoxStyle dropDownStyle; [property getter]
public final int dropDownWidth; [property setter]
public final int dropDownWidth; [property getter]
public final bool droppedDown; [property setter]
public final bool droppedDown; [property getter]
public final void endUpdate();
public final int findString(char[] str,int startIndex);
public final int findString(char[] str);
public final int findStringExact(char[] str);
public final int findStringExact(char[] str,int startIndex);
public final int getItemHeight(int idx);
public final bool integralHeight; [property setter]
public final bool integralHeight; [property getter]
public int itemHeight; [property getter]
public int itemHeight; [property setter]
public final ObjectCollection items; [property getter]
public final uint maxLength; [property setter]
public final uint maxLength; [property getter]
public Event measureItem(ComboBox,MeasureItemEventArgs);
public const int NO_MATCHES;
protected void onDrawItem(DrawItemEventArgs dieh);
protected void onHandleCreated(EventArgs ea);
protected void onMeasureItem(MeasureItemEventArgs miea);
protected void onPaintBackground(PaintEventArgs pea);
protected void onReflectedMessage(ref Message m);
protected void prevWndProc(ref Message msg);
public final void selectAll();
public int selectedIndex();
public void selectedIndex(int idx);
public final Object selectedItem; [property getter]
public final Object selectedItem; [property setter]
public final char[] selectedItem; [property setter]
public Object selectedValue; [property getter]
public Object selectedValue; [property setter]
public char[] selectedValue; [property setter]
public final uint selectionLength; [property setter]
public final uint selectionLength; [property getter]
public final uint selectionStart; [property setter]
public final uint selectionStart; [property getter]
public final bool sorted; [property getter]
public final bool sorted; [property setter]
public uint textLength; [property getter]
protected void wndProc(ref Message msg);
[+] Inherited members
}
public static class ComboBox.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 ComboBoxStyle;

Page last modified on July 03, 2008, at 10:22 PM