Copyright © 2003-2010 MultiMedia Soft

How to use the Split Button component

Previous pageReturn to chapter overviewNext page

Split buttons are buttons that are usually associated to a drop-down menu. Pressing the button should carry out an action; alternatively, clicking on arrow to the right or to the bottom of the "split" should display different but similar actions that can be performed by clicking on the menu item. The screenshot below shows a menu item displayed after clicking on the arrow of the split button.

3dcm_i0001af

Split buttons can be vertical as in the image below

3dcm_i0001b0

or horizontal as in the image below

3dcm_i0001b1

All you have to do is to place a Ctl3dSplitButton control control into your form

You can decide the orientation of the split through the SplitButtonType property and its size through the SplitButtonSizePerc property.

You can define the color of the split line through the SplitButtonHighlightColor and SplitButtonShadowColor properties.

By default, the arrow of the split button is made-up of a triangle whose color can be set through the SplitButtonArrowColor property: if the default arrow shouldn't be enough for you, you can set your own arrow picture through the SplitButtonPicture property. In both cases, the arrow positioning can be fine-tuned through the SplitButtonArrowOffsetX and SplitButtonArrowOffsetY properties.

The drop-down menu is not embedded inside the control and must be displayed using one of the available .NET framework calls after catching the SplitButtonClick event; other events are generated by the control when the mouse hovers and leaves the split area: the SplitButtonMouseIn and the SplitButtonMouseOut events respectively.

The simplest way to change options applied to the Split Button style is to use, inside 3D Button Visual Editor, the Split Button tab. At run-time each of these properties can be referenced by name.

Note: The images below have hot links to take you to explanations of the various button settings.

3dcm_i0001b2

 

 

Item name

Description

Corresponding property


Split button type

The type of split button

SplitButtonType


Size in percentage

The size of the split button, expressed in percentage, respect to the total size of the button.

SplitButtonSizePerc


Highlight color

The color used to render the highlighted portion of the split line

SplitButtonHighlightColor


Shadow color

The color used to render the shadowed portion of the split line

SplitButtonShadowColor


Arrow color

The color used to render the arrow

SplitButtonArrowColor


Preview of the arrow picture

Preview of the loaded picture

SplitButtonPicture


3dcm_i000013 Browse button

Browses the current PC folders for a picture

 


3dcm_i000015Delete button

Deletes the current picture

 


Arrow offset X

The horizontal offset to fine-tune the arrow position over the control.

SplitButtonArrowOffsetX


Arrow offset Y

The vertical offset to fine-tune the arrow position over the control.

SplitButtonArrowOffsetY