DCX - Dialog Control Xtension Home | Translations | Download | Forum | Bug Tracker
v1.3.7
Box
The box control is a container control like the panel. It hosts other controls inside and also has the Cell Layout Algorithm available to manage the layout of child controls automatically.

Control Styles
These control styles are available when creating a Box control. Remember that the general styles disabled, group, notheme, tabstop and transparent apply to all DCX controls.
alpha Control is alpha blended.
bottom Control text is at the bottom of the box.
center Control text is centered.
none Control will not display a border or label.
right Control text is right justified.
rounded The border drawn for the box control will be a rounded rectangle.
shadow Display text with a shadow.
 
Note.
  • Applying the border regular+dialog frame border styles on the box will give it a titlebar. (/xdid -x DNAME BOX_ID +bd)
  • shadow will only work if the text color is not black or the same as the default text color on the current windows theme (ie. $rgb(0, 0, 0) or $dcx(GetSystemColor, COLOR_WINDOWTEXT) respectively). Change it by using xdid -C

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -c
This command lets you add a child control to a box control.
Syntax:
/xdid -c [DNAME] [ID] [CID] [CONTROL] [X] [Y] [W] [H] (OPTIONS)
Example:
/xdid -c dcx 4 12 richedit 10 10 400 25 multi
Parameters:
CID Unique control ID for the DCX Control. Must be unique for all the controls of the dialog!
CONTROL The type of DCX Control to be created.
pbar Creates a Progressbar control.
treeview Creates a TreeView control.
toolbar Creates a Toolbar control.
statusbar Creates a Statusbar control.
comboex Creates a ComboEx control.
listview Creates a Listview control.
trackbar Creates a Trackbar control.
rebar Creates a Rebar control.
colorcombo Creates a ColorCombo control.
button Creates a Button control.
richedit Creates a RichEdit control.
ipaddress Creates a IpAddress control.
updown Creates an UpDown control.
webctrl Creates a WebCtrl.
pager Creates a Pager control.
   
line Creates a Line control.
box Creates a Box control.
radio Creates a Radio control.
check Creates a Check control.
edit Creates a Edit control.
scroll Creates a Scroll control.
image Creates a Image control.
list Creates a List control.
link Creates a Link control.
text Creates a Text control.
    
divider Creates a Divider control.
panel Creates a Panel control.
tab Creates a Tab control.
window Docks a mIRC @window. The first parameter in OPTIONS must be the @window name.
dialog Docks a mIRC dialog. The first parameter in OPTIONS must be the dialog name.
X X position of control.
Y Y position of control.
W Width of control.
H Height of control.
OPTIONS Optional styles and options available on each individual controls.

/xdid -d
This command lets you delete a control added on the box.
Syntax:
/xdid -d [DNAME] [ID] [CID]
Example:
/xdid -d dcx 4 6

/xdid -l
This command lets you add Cell Layout Algorithm rules to your dialog controls for automatic resizing of the child controls.
Syntax:
/xdid -l [DNAME] [ID] [COMMAND] [PATH] [TAB] [+FLAGS] [CID] [WEIGHT] [W] [H]
Example:
/xdid -l dcx 4 root $chr(9) +pv 0 1 0 0
/xdid -l dcx 4 root 1 2 $chr(9) +fi 7 1 200 300
/xdid -l dcx 4 space 1 $chr(9) + 5 5 5 5
Parameters:
COMMAND Layout command.
clear Clears all CLA rules.
root Sets the root cell element.
cell Adds a cell element as a child of another cell element.
space Sets the space padding around a cell element.
update Updates the cell layout (must be used after adding rules or changing padding settings to refresh display).
PATH Cell Path from root element (can be root to point to root element).
+FLAGS Flags to manipulate Cell Layout Algorithm.
f Creates a fixed cell element.
h Creates a width fixed cell if used with +f or a horizontal cell pane if used with +p.
i Indicates that the supplied control ID is valid and is the child control when used with +f or +l.
l Creates a fill cell element.
p Creates a pane cell element.
v Creates a height fixed cell if used with +f or a vertical cell pane if used with +p.
w When used, it means that the supplied W and H represent the fixed cell width in the applicable direction (if the fixed cell is fixed in width, height or both).
CID ID of the control (used with fixed or fill cells - use 0 if no control is to be linked to the cell).
WEIGHT Cell child weight. (used when adding a child cell to a pane cell)
W Fixed width of control (used with fixed cell).
H Fixed height of control. (used with fixed cell)
 
Note.
  • See the Cell Layout Algorithm explanation for concrete examples.
  • If you use the update command in the init event of a dialog, you will have to use ".timer 1 0 xdialog -l dialog update" as a glitch with XP and themes disabled prevents windows from appearing. The timer corrects this problem.
  • When using the space command, the ID WEIGHT W H are in fact the LEFT TOP RIGHT BOTTOM spacings
  • Use the value 0 for the fields not used as the command expects them to be filled even though they aren't used.

/xdid -t
This command lets you set the group box text.
Syntax:
/xdid -t [DNAME] [ID] (TEXT)
Example:
/xdid -t dcx 4 Group Box Text

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().inbox
This property lets you retreive interior frame box size that clears the box border and text.
Syntax:
$xdid(dialog, ID).inbox
Example:
$xdid(dcx, 4).inbox
 
Note. The return value is X Y W H.

$xdid().text
This property lets you retreive the group box text.
Syntax:
$xdid(dialog, ID).text
Example:
$xdid(dcx, 4).text

Box Events
These events are fired when activity occurs in the Box control.
checkchange
When the checkbox has been clicked.
Syntax:
/cb_alias DNAME checkchange ID STATE
Example:
/cb_alias dcx checkchange 4
Parameters:
STATE The state of the checkbox, 1 for checked, 0 for unchecked.
Returnnochange to cancel automatic enabling/disabling of the child controls in the box.

dclick
When the left mouse button is double clicked.
Syntax:
/cb_alias DNAME dclick ID
Example:
/cb_alias dcx dclick 4

help
Launched when you click on a control using the ? contexthelp button.
Syntax:
/cb_alias DNAME help ID
Example:
/cb_alias dcx help 4

lbdown
When the left mouse button is clicked down.
Syntax:
/cb_alias DNAME lbdown ID
Example:
/cb_alias dcx lbdown 4

lbup
When the left mouse button is released.
Syntax:
/cb_alias DNAME lbup ID
Example:
/cb_alias dcx lbup 4

rclick
When the right mouse button is clicked.
Syntax:
/cb_alias DNAME rclick ID
Example:
/cb_alias dcx rclick 4

sclick
When the left mouse button is clicked and released.
Syntax:
/cb_alias DNAME sclick ID
Example:
/cb_alias dcx sclick 4

Contact © 2005-2006 Last Updated: 14th January, 07

Valid XHTML 1.0 Transitional Valid CSS!