DCX - Dialog Control Xtension
 
Tab
The tab control is a collection of controls which allows the user to select a visible page at a time.

Control Styles
These control styles are available when creating a Tab control. Remember that the general styles disabled, group, hidden, notheme, tabstop and transparent apply to all DCX controls except the embedded Dialog and Window controls.
alpha The control is alpha blended.
bottom The tabs are aligned at the bottom. (See note below)
buttons The tabs appear as buttons like a toolbar.
closable The tabs have a close button on the right of the tab.
fixedwidth All tabs are the same width.
flat The tab buttons appear flat. (Only with buttons)
flatseps The tab separators are drawn as flat (Only with buttons and flat).
gradient A gradient background is applied. (Only works with closable)
hot The tab item under the mouse is highlighted (may not work on some systems).
multiline The tabs aline themselves on multiple rows (default is single row).
right The tabs are aligned verticaly right (used with vertical). (See note below).
rightjustify The width of each tab is increased so the tab fills the entire width of the row (Only with multi).
scrollopposite Unneeded tabs scroll to the opposite side of the control when a tab is selected.
vertical The tabs are aligned verticaly left. (See note below).
 
Note.
  • Vertical and bottom tabs are not supported correctly in XP Themes. The control works, but the tabs are not drawn properly. There is no easy fix for this at the moment. It is a bug in the windows theme system, not in the API.
  • When using the gradient style, the gradient color can be changed by applying the text background color with xdid -C

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -a
This command lets you add a child control to a tab control.
Syntax:
/xdid -a [DNAME] [ID] [N] [ICON] (TEXT) [TAB] [CID] [CONTROL] [X] [Y] [W] [H] (OPTIONS) [TAB] (TOOLTIP)
Example:
/xdid -a dcx 4 0 1 Tab1 $chr(9) 12 richedit 10 10 400 25 multi $chr(9) Tooltip
Parameters:
N Position where the tab will be inserted (Use 0 to insert at the end).
ICON Icon index to be displayed (Use 0 for no icon).
TEXT Tab item text.
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.
treeview Creates a TreeView control.
listview Creates a Listview control.
rebar Creates a Rebar control.
webctrl Creates a WebCtrl.
   
edit Creates a Edit control.
image Creates a Image control.
list Creates a List control.
    
divider Creates a Divider control.
panel Creates a Panel control.
tab Creates a Tab control.
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.
TOOLTIP Not functional yet.
 
Note. The control is optional. You can use the tab control without child controls as a toolbar (like bar of buttons).

/xdid -c
This command lets you select the Nth tab item.
Syntax:
/xdid -c [DNAME] [ID] [N]
Example:
/xdid -c dcx 4 5

/xdid -d
This command lets you delete a control added on the panel.
Syntax:
/xdid -d [DNAME] [ID] [CID]
Example:
/xdid -d dcx 4 6
 
Note. The control associated with the tab is removed when you delete a tab item.

/xdid -l
This command lets you change the Nth tab item icon (Use 0 for no icon).
Syntax:
/xdid -l [DNAME] [ID] [N] [ICON]
Example:
/xdid -l dcx 4 2 3

/xdid -m
This command lets you change the tab item width and height (Only works with the fixedwidth).
Syntax:
/xdid -m [DNAME] [ID] [CX] [CY]
Example:
/xdid -m dcx 4 50 20

/xdid -r
This command lets you clear all the tab items.
Syntax:
/xdid -r [DNAME] [ID]
Example:
/xdid -r dcx 4

/xdid -t
This command lets you change the Nth tab item text.
Syntax:
/xdid -t [DNAME] [ID] [N] (Itemtext)
Example:
/xdid -t dcx 4 2 New Text

/xdid -v
This command allows you to move the tab item to a new position.
Syntax:
/xdid -v [DNAME] [ID] [N] [POS]
Example:
/xdid -v dcx 4 1 3
Parameters:
N The tab to move.
POS The new position for the item.

/xdid -w
This command lets you add an icon to the tab image list.
Syntax:
/xdid -w [DNAME] [ID] [+FLAGS] [INDEX] [FILENAME]
Example:
/xdid -w dcx 4 +g 113 shell32.dll
Parameters:
+FLAGS Icon flags
a Uses the icon associated with the given file (as shown in Windows Explorer).
Note: File must exist.
f Uses the icon associated with the given filetype.
Note: Filename is the extension (eg. BMP, PNG, AVI, etc).
g Convert to grayscale icon.
P If GDI+ is enabled, this will use GDI+ to extract the icon.
INDEX Icon index in icon archive
FILENAME Icon archive filename
 
Note. Use 0 for INDEX if the file is a single icon file.

/xdid -y
This command lets you clear the tab image list.
Syntax:
/xdid -y [DNAME] [ID]
Example:
/xdid -y dcx 4

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().childid
This property lets you retreive Nth tab child control ID ($null if no child control on the tab).
Syntax:
$xdid(dialog, ID, N).childid
Example:
$xdid(dcx, 4, 2).childid

$xdid().icon
This property lets you retreive Nth tab icon.
Syntax:
$xdid(dialog, ID, N).icon
Example:
$xdid(dcx, 4, 2).icon

$xdid().mouseitem
This property lets you retreive the tab item which the mouse is currently over.
Syntax:
$xdid(dialog, ID).mouseitem
Example:
$xdid(dcx, 4).mouseitem
 
Note. Returns -1 if mouse is not over any item.

$xdid().num
This property lets you retreive the total number of tab items.
Syntax:
$xdid(dialog, ID).num
Example:
$xdid(dcx, 4).num

$xdid().sel
This property lets you retreive the tab selected item number.
Syntax:
$xdid(dialog, ID).sel
Example:
$xdid(dcx, 4).sel

$xdid().seltext
This property lets you retreive selected tab item text.
Syntax:
$xdid(dialog, ID).seltext
Example:
$xdid(dcx, 4).seltext

$xdid().text
This property lets you retreive the Nth tab item text.
Syntax:
$xdid(dialog, ID, N).text
Example:
$xdid(dcx, 4, 1).text

Tab Events
These events are fired when activity occurs in the Tab control.
closetab
When the close button on the tab is clicked.
Syntax:
/cb_alias DNAME closetab ID ITEM
Example:
/cb_alias dcx closetab 4 2
Parameters:
ITEM Tab item index number over which the event was triggered.

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

rclick
When a rclick event is fired over the selected tab band.
Syntax:
/cb_alias DNAME rclick ID ITEM
Example:
/cb_alias dcx rclick 4 2
Parameters:
ITEM Tab item index number over which the event was triggered.

sclick
When a tab item is selected.
Syntax:
/cb_alias DNAME sclick ID ITEM
Example:
/cb_alias dcx sclick 4 2
Parameters:
ITEM Tab item index number over which the event was triggered.

sizing
This is triggered when the tab and/or any children controls are resized.
Syntax:
/cb_alias DNAME sizing ID CID
Example:
/cb_alias dcx sizing 4 8
Parameters:
CID The ID of the control being resized.

Contact � 2005-2009 Last Updated: 12th July, 09

Valid XHTML 1.0 Transitional Valid CSS!