[archived content]

About

A TextBox? is used for a Control that edits a single formatting of text.

Example

import dfl.all;

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

        auto currentTextBox = new TextBox;
        currentTextBox.dock = DockStyle.TOP;
        currentTextBox.textAlign = HorizontalAlignment.CENTER;
        currentTextBox.text = "I'm a header!";
        currentTextBox.foreColor = Color(100,255,255);
        form.controls.add(currentTextBox);

        currentTextBox = new TextBox;
        currentTextBox.dock = DockStyle.BOTTOM;
        currentTextBox.textAlign = HorizontalAlignment.RIGHT;
        currentTextBox.text = "I'm a footer!";
        currentTextBox.backColor = Color(255,100,255);
        form.controls.add(currentTextBox);

        currentTextBox = new TextBox;
        currentTextBox.dock = DockStyle.FILL;
        currentTextBox.textAlign = HorizontalAlignment.LEFT;
        currentTextBox.text = "I'm the content";
        form.controls.add(currentTextBox);


        Application.run(form);
}

TODO

Password support?

module dfl.textbox;
public class TextBox: TextBoxBase
{
public final bool acceptsReturn; [property setter]
public final bool acceptsReturn; [property getter]
public final CharacterCasing characterCasing; [property setter]
public final CharacterCasing characterCasing; [property getter]
protected void onHandleCreated(EventArgs ea);
public final dchar passwordChar; [property getter]
public final dchar passwordChar; [property setter]
public final ScrollBars scrollBars; [property setter]
public final ScrollBars scrollBars; [property getter]
public final HorizontalAlignment textAlign; [property setter]
public final HorizontalAlignment textAlign; [property getter]
[+] Inherited members
}
public static class TextBox.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 class TextBoxBase: Control
{
public final bool acceptsTab; [property getter]
public final bool acceptsTab; [property setter]
public final void appendText(char[] txt);
public Color backColor; [property getter]
public BorderStyle borderStyle; [property getter]
public BorderStyle borderStyle; [property setter]
public final bool canUndo; [property getter]
public final void clear();
public final void clearUndo();
public final void copy();
public void createHandle();
protected void createParams(ref CreateParams cp);
public Cursor cursor; [property getter]
public final void cut();
public static Color defaultBackColor; [property getter]
public static Color defaultForeColor; [property getter]
protected Size defaultSize; [property getter]
public Color foreColor; [property getter]
public final uint getLineCount();
public final bool hideSelection; [property setter]
public final bool hideSelection; [property getter]
public final char[][] lines; [property setter]
public final char[][] lines; [property getter]
public uint maxLength; [property setter]
public uint maxLength; [property getter]
public final bool modified; [property getter]
public final bool modified; [property setter]
public bool multiline; [property setter]
public bool multiline; [property getter]
protected void onHandleCreated(EventArgs ea);
protected void onReflectedMessage(ref Message m);
public final void paste();
protected void prevWndProc(ref Message msg);
public final bool readOnly; [property getter]
public final bool readOnly; [property setter]
public final void scrollToCaret();
public final void select(uint start,uint length);
public final void selectAll();
public char[] selectedText; [property setter]
public char[] selectedText; [property getter]
public uint selectionLength; [property setter]
public uint selectionLength; [property getter]
public uint selectionStart; [property setter]
public uint selectionStart; [property getter]
public uint textLength; [property getter]
public char[] toString();
public final void undo();
protected void wndProc(ref Message msg);
public final bool wordWrap; [property setter]
public final bool wordWrap; [property getter]
[+] Inherited members
}
public static class TextBoxBase.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);
}

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