[archived content]

About:

A Splitter is a Control that allows the resizing of 2 Controls by providing a handle that may be dragged to resize the controls. Splitters cannot handle more than 2 Controls around them so you will have to use Containers if you want to do more than 2 Containers.

Usage:

A Splitter is not a ContainerControl ? and as such you do not add Controls to it. This actually makes programming easy as you just do intuitive programming. Add a Control before you add the Splitter and add a Control After you add the Splitter. When you set all the DockStyles ? it will adjust accordingly.

Example

import dfl.all;
public void main() {
 auto form = new Form();
 form.text = "Splitter Example";
 auto btn1 = new Button();
 btn1.text = "1";
 btn1.dock = DockStyle.LEFT;
 btn1.parent = form;
 auto split = new Splitter();
 split.dock = DockStyle.LEFT;
 split.parent = form;
 auto btn2 = new Button();
 btn2.text = "2";
 btn2.dock = DockStyle.FILL;
 btn2.parent = form;
 Application.run(form);
}

module dfl.splitter;
public class Splitter : Control
{
public AnchorStyles anchor ; [property setter]
protected Size defaultSize ; [property getter]
public DockStyle dock ; [property setter]
public final int minSize ; [property setter]
public final int minSize ; [property getter]
public bool movingGrip ; [property setter]
public bool movingGrip ; [property getter]
protected void onMouseDown (MouseEventArgs mea);
protected void onMouseMove (MouseEventArgs mea);
protected void onMouseUp (MouseEventArgs mea);
protected void onMove (EventArgs ea);
protected void onPaint (PaintEventArgs ea);
protected void onResize (EventArgs ea);
protected void onSplitterMoved (SplitterEventArgs sea);
protected void onSplitterMoving (SplitterEventArgs sea);
public Event splitterMoved (Splitter,SplitterEventArgs);
public Event splitterMoving (Splitter,SplitterEventArgs);
[+] 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 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 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 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 Splitter.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 SplitterEventArgs : EventArgs
{
public final int splitX ; [property getter]
public final int splitX ; [property setter]
public final int splitY ; [property getter]
public final int splitY ; [property setter]
public final int x ; [property getter]
public final int y ; [property getter]
[+] Inherited members
empty
}

Page last modified on June 26, 2008, at 07:18 PM

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