[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
backColor backColorChanged bottom bounds bringToFront bringUpOne canFocus canSelect capture click clientRectangle clientSize contains containsFocus contextMenu contextMenuChanged controlAdded ControlCollection controlRemoved controls createControl createControlsInstance created createGraphics createHandle createParams cursor cursorChanged defaultBackColor defaultFont defaultForeColor defaultSize defWndProc delayInvoke destroyHandle disable disableVisualStyle displayRectangle dispose disposed dock doubleClick enable enabled enabledChanged findForm focus focused font fontChanged foreColor foreColorChanged fromChildHandle fromHandle getAutoScaleSize getChildAtPoint getItemText getStyle getTopLevel gotFocus handle handleCreated handleDestroyed hasChildren hasLayout hasLayoutChanged height helpRequested hide initLayout invalidate invoke invokeRequired isHandleCreated isMnemonic keyDown keyPress keyUp layout left location lostFocus modifierKeys mouseButtons mouseDown mouseEnter mouseHover mouseLeave mouseMove mousePosition mouseUp mouseWheel move name onBackColorChanged onClick onContextMenuChanged onControlAdded onControlRemoved onCursorChanged onDisposed onDoubleClick onEnabledChanged onFontChanged onForeColorChanged onGotFocus onHandleCreated onHandleDestroyed onHasLayoutChanged onHelpRequested onKeyDown onKeyPress onKeyUp onLayout onLostFocus onMouseDown onMouseEnter onMouseHover onMouseLeave onMouseMove onMouseUp onMouseWheel onMove onPaint onPaintBackground onParentChanged onReflectedMessage onResize onRightToLeftChanged onSelectedIndexChanged onSelectedValueChanged onSystemColorsChanged onTextChanged onVisibleChanged opCmp opEquals paint parent parentChanged performLayout pointToClient pointToScreen preProcessMessage processKeyEventArgs processMnemonic recreateHandle recreatingHandle rectangleToClient rectangleToScreen redraw refresh region resetBackColor resetCursor resetFont resetForeColor resetRightToLeft resetText resize resizeRedraw resumeLayout right rightToLeft rightToLeftChanged select selectedIndex selectedValue selectedValueChanged selectNextControl sendBackOne sendToBack setBounds setBoundsCore setClientSizeCore setStyle setVisibleCore show size supportsMouseTracking suspendLayout systemColorsChanged tabStop tag text textChanged top topLevelControl toString update updateStyles visible visibleChanged width wndProc zIndex
}
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

AltStyle によって変換されたページ (->オリジナル) /