DCX - Dialog Control Xtension
 
Listview
This control enables you to create a listview in 4 different view styles: icon, small icon, list and report.

Control Styles
These control styles are available when creating a Listview 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.
icon Creates a listview in icon view.
list Creates a listview in item list view.
report Creates a listview in report view (the view with columns and grid).
smallicon Creates a listview in smallicon view.

alignleft Items are left-aligned in the listview control. (icon & smallicon views)
aligntop Items are aligned with the top of the listview control. (icon & smallicon views)
alpha The control is alpha blended.
autoarrange Items are rearranged automaticly when inserted. (icon & smallicon views)
autoautoarrange Automatically arrange icons if no icon positions have been set (Similar to autoarrange) (icon & smallicon view).
autocheck Automatically select check boxes on single click. (checkbox needed)
autosize Automatically size listview columns. (report view)
balloon The listview and listview items tooltip will use the balloon style.
borderselect When an item is selected a special border is drawn arround it instead of it being highlighted.
checkbox Enables checkbox support in the list view. (report view)
columnjustify Icons are lined up in columns that use up the whole view. (icon & smallicon view)
columnoverflow Indicates that an overflow button should be displayed in icon/tile view if there is not enough client width to display the complete set of header items. (headeralways needed) (icon & smallicon view)
columnsnap Snap to minimum column width when the user resizes a column.
drag Enables item dragging.
editlabel Enables the possibility to edit listview item labels. (To make a a column editable, see /xdid -o)
flatsb Enables flat scroll bars on the listview.
fullrow Highlights the full row when an item is selected. (report view)
grid Displays grid lines between item cells. (report view)
headeralways Show column headers in all view modes.
headerdrag Enables the possibility to drag listview headers to another position. (report view)
hidelabels Hides the labels in icon and small icon view. (icon & smallicon view)
hottrack Enables hot-track selection in a listview control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time.
noheader Does not display the header on the listview. (report view unless headeralways is used)
noheadersort This will prevent the headers from being clickable.
nolabelwrap The text is displayed on a single line. (icon & smallicon views)
noscroll Scrolling is disabled. All items must be within the client area. (icon & smallicon views)
oneclick Activates an item on single click. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. (Not to be used with twoclick)
shadowtext Enable shadow text on transparent backgrounds only. (transparentbkg needed)
showsel When the control loses focus, the selection is still displayed.
singlesel Allows only one item at a time to be selected. By default, multiple items can be selected.
snaptogrid In icon view, icons automatically snap into a grid. (icon & smallicon view)
sortasc Items are sorted based on item text in ascending order.
sortdesc Items are sorted based on item text in descending order.
subitemimage Subitems have images. (report view)
tooltip If a partially hidden label in any view lacks tooltip text, the control will unfold the label. If this style is not set, the control will unfold partly hidden labels only for the icon view.
transparentbkg Background is painted by the parent.
twoclick Activates an item on double click. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. (Not to be used with oneclick)
underlinecold Causes those non-hot items that may be activated to be displayed with underlined text. (twoclick needed)
underlinehot Causes those hot items that may be activated to be displayed with underlined text. (oneclick or twoclick needed)
 
Note.

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -a
This command lets you add an item to the listview.
Syntax:
/xdid -a [DNAME] [ID] [N] [INDENT] [+FLAGS] [ICON] [STATE] [OVERLAY] [GROUPID] [COLOR] [BGCOLOR] (TEXT) [TAB] [+FLAGS] [ICON] [OVERLAY] [COLOR] [BGCOLOR] (TEXT) [TAB] ...
Example:
/xdid -a dcx 4 1 0 +cbku 1 0 0 0 $rgb(170,213,255) $rgb(0,255,255) text $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) text2 $chr(9) + 0 -1 $rgb(120,255,210) $rgb(255,255,0) text3
Parameters:
N Position where the listview item is inserted. (Use 0 to insert at the end)
INDENT Space in icon width at the beginning of a line in the listview (0 for no space)
+FLAGS Item flags.
a Autosize.
b The item is bold.
c The item has a text color defined by the COLOR parameter (use -1 for no color).
C The item has no text so the icon should be centered
d The item appears selected like a drop target.
f The item has focus thus having a dotted box around it.
h Autosize according to header text width.
H Allows you to load an item from a hash table by name. Cannot be used with +n
i The item is italic.
k The item has a background color defined by the BGCOLOR parameter (use -1 for no color).
m Autosize the column to fit header or content.
n Allows you to load an item from a hash table by index. Cannot be used with +H
s The item is selected.
p The item is a DCX ProgressBar control. (This flag is changing its args etc... expect errors)
t The item icon appears as 50% opaque, looks like it has a "ghost" effect.
u The item is underlined.
w (TEXT) is [+IFLAGS] [TABLE NAME] [N|N1-N2|name]
y (TEXT) is [+IFLAGS] [@windowname] [N|N1-N2]
z (TEXT) is [+IFLAGS] [DIALOG] [ID] (N|N1-N2)
ICON Icon index number from the normal icon list.
STATE Icon index number from the state icon list.
0 No check.
1 Unchecked.
2 Checked
OVERLAY Icon index number from the overlay icon list.
GROUPID Group ID. (Use 0 for no value) (XP+)
COLOR Item text color.
BGCOLOR Item background color.
TEXT The text to display in the cell.
If used with +p +FLAGS, then this is the DCX ProgressBar style.
If used with +H or +n +FLAGS, then this is either HASHTABLE ITEM or HASHTABLE INDEX respectively.
 
Note.
  • Icons must be added prior to be used in the listview using /xdid -w
  • The INDENT parameter only works if you are using normal icons in the listview.
  • Even if there are icons in the icon lists and 0 is used for no icon, there will be the an icon indent space in front of the item text. (normal and state icon lists)
  • You can use 0 for the #ICON, and #OVERLAY values if you wish to use no icon.
  • You need to use checkbox style in order to use checkboxes in the listview.
  • [+IFLAGS] is a combination of
  • + No Flags specified. [N] provided, add a single item as text only.
  • +a item(s) contain all the flags & icon info etc.. for the item(s) to be added from [INDENT] onwards.
  • +A add all items starting at N
  • +n [N1-N2] numeric range supplied. Add all items in range. (can't be used with +A)
  • - N1 must be > 0
  • - N2 can't be 0, but can be a negative.
  • +i [name] single named item to be added. (can't be used with +n or +A)

/xdid -c
This command lets you select listview items.
Syntax:
/xdid -c [DNAME] [ID] [N(,N2,N3-N4,...)]
Example:
/xdid -c dcx 4 1,3,5,10-30
 
Note. In a singlesel listview, there is only one value for N.

/xdid -d
This command lets you delete the Nth listview item.
Syntax:
/xdid -d [DNAME] [ID] [N(,N,N-N,...)] ([+FLAGS] [SUBITEM] [MATCH])
Example:
/xdid -d dcx 4 1,3,5,10-30
Parameters:
N(,N,N-N,...) If +FLAGS is not specified, this is the item(s) to delete. If +FLAGS is specified this is the item to start searching from.
+FLAGS Search flags.
w Wildcard search.
r Regex search.
t Exact match plain text search. (default if no flag specified)
SUBITEM The subitem to search.
MATCH The search pattern.

/xdid -g
This command lets you set a background image to the listview control.
Syntax:
/xdid -g [DNAME] [ID] [+FLAGS] [X] [Y] (FILENAME)
Example:
/xdid -g dcx 4 +n 50 50 $mircdir/images/blah.png
Parameters:
+FLAGS Image flags.
n Normal image.
r Remove image.
t Tiled Image.
X Normal horizontal offset.
Y Normal vertical offset.
FILENAME Filename of the image including the path.
 
Note. For X and Y, 0 = left aligned, 50 = centred, 100 = right aligned.

/xdid -i
This command lets you change the listview control colors.
Syntax:
/xdid -i [DNAME] [ID] [+FLAGS] [COLOR]
Example:
/xdid -i dcx 4 +bk none
Parameters:
+FLAGS Color flags.
b Background color.
k Text background color.
o Outline color. (see borderselect style)
t Text color.
COLOR Color in $rgb() format.
 
Note.
  • COLOR can be none for no colors, for both background and text background flags.
  • If COLOR is none for text background, the text background parameter of /xdid -a wont work anymore.

/xdid -j
This command lets you change the appearance of a listview item.
Syntax:
/xdid -j [DNAME] [ID] [N] [NSUB] [STATE] (COLOR BGCOLOR)
Example:
/xdid -j dcx 4 2 5 +bt
/xdid -j dcx 4 7 1 +uck $rgb(255, 0, 0) $rgb(0, 255, 0)
Parameters:
N The row index for the item.
NSUB The column index for the item.
STATE Item flags
b The item is bold.
c The items text colour.
d The item appears selected like a drop target.
f The item has focus thus having a dotted box around it.
i The item is italic.
k The items background colour.
s The item is selected.
t The item appears as 50% opaque, looks like it has a "ghost" effect.
u The item is underlined.
 
Note. Changing the color of column NSUB will subsequently change the color of following columns.

/xdid -k
This command lets you change the check state on the Nth listview item.
Syntax:
/xdid -k [DNAME] [ID] [STATE] [N(,N2,N3-N4...)]
Example:
/xdid -k dcx 4 2 1,3,5,10-30
Parameters:
STATE Check State
0 No check.
1 Unchecked.
2 Checked
N(,N2,N3-N4...) The item(s) to change the state of.
 
Note. If you are not using the checkbox style, this function can also change the state icon of an item. Be sure to insert the state icons before you use them.

/xdid -l
This command lets you change the listview item icon.
Syntax:
/xdid -l [DNAME] [ID] [N(,N2,N3-N4...)] [NSUB(,NSUB2,NSUB3-NSUB4...)] [ICON] (OVERLAY)
Example:
/xdid -l dcx 4 1,3,5,10-30 2-4 5 3
Parameters:
N(,N2,N3-N4...) Item index.
NSUB(,NSUB2,NSUB3-NSUB4...) Column index.
ICON Icon index
OVERLAY Overlay icon index
 
Note.
  • Use 0 for ICON and OVERLAY to display no icon.
  • If you only want to change the overlay, use -1 for ICON.
  • The NSUB ranges are changed for each item in the supplied N ranges.

/xdid -m
This command lets you trigger the group view in the listview, which is off by default. (XP+)
Syntax:
/xdid -m [DNAME] [ID] [1|0]
Example:
/xdid -m dcx 4 1

/xdid -n
This command lets you change the Nth listview column width (report view only).
Syntax:
/xdid -n [DNAME] [ID] [COL] [+FLAGS] (WIDTH ...)
Example:
/xdid -n dcx 4 2 + 100
/xdid -n dcx 4 1,3-6 + 100
/xdid -n dcx 4 0 +m 150 100 200
Parameters:
COL Column index.
+FLAGS Flags for column width.
a Autosize.
h Autosize according to header text width.
F Autosize the column to a fixed width.
S Autosize the column to fit header or content. Cannot be used with +a.
P Autosize the column to a percentage of the total width.
m Allows you to set the widths manually. COL is ignored.
WIDTH Header width (Ignored if you use flags +a, +h or +s).
 
Note.
  • If the flag +h is used for the last column, the column will be resized to the width of the control.
  • +m flag cannot be used with the +a, +h or +S flags.
  • If no flags are used then [COL] can be a single column or a group of columns eg: 1,2,8-12

/xdid -o
This command lets you change the column order within the listview. (report view only)
Syntax:
/xdid -o [DNAME] [ID] [COL_ID ...]
Example:
/xdid -o dcx 4 3 2 1
/xdid -o dcx 4 1 3 2 4
 
Note. This command can be used to set/move the first column, which is editable. There can only be one editable column at any time.

/xdid -q
This command lets you add a group to the listview. (XP+)
Syntax:
/xdid -q [DNAME] [ID] [N] [+FLAGS] [GROUPID] [GROUPTEXT]
Example:
/xdid -q dcx 4 1 +l 101 Group 101!
Parameters:
N Group index order.
+FLAGS Group flags.
c Group text is centered.
l Group text is left aligned.
r Group text is right aligned.
GROUPID ID that identifies the group when adding items in /xdid -a.
GROUPTEXT Label for the group.

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

/xdid -t
This command lets you set the different column header text, width and alignment.
Syntax:
/xdid -t [DNAME] [ID] [+FLAGS] [#ICON] [WIDTH] (TEXT) [TAB] [+FLAGS] [#ICON] [WIDTH] (TEXT) [TAB] ...
Example:
/xdid -t dcx 4 +l 2 130 column 1 $chr(9) +cd 1 130 column 2 $chr(9) +rb 2 130 column 3
Parameters:
+FLAGS Item flags.
b Header icon appears right of text.
c Header text is centered.
l Header text is left justified.
r Header text is right justified.
f Header is a fixed width. (Column can't be resized)
q Header is a fixed ratio.
d Header is a split button. (only works on subitems)
e Header has a sort down arrow.
g Header has a sort up arrow.
ICON Icon index number from the icon list (0 for no icon).
WIDTH Column width in pixels.
 
Note.
  • The leftmost column is always left aligned. If you want a leftmost column aligned other than left, create a zero width left dummy column.
  • If you re-issue this command while the listview is populated, all the data except the first column will disappear, so you will have to refill the list.

/xdid -u
This command makes the currently selected listview item unselected.
Syntax:
/xdid -u [DNAME] [ID]
Example:
/xdid -u dcx 4

/xdid -v
This command lets you change the listview item text. If the target item is a DCX control, then this allows you to send /xdid commands to the embedded control.
Syntax:
/xdid -v [DNAME] [ID] [N] [NSUB] (TEXT)
Example:
/xdid -v dcx 4 1 2 5
Parameters:
N Item row.
NSUB Column index.
TEXT Item Text, or command to send to control.
 
Note.
  • Use TEXT as -v 80 to set the value of a progress bar.
  • If N == -1 then sets the empty listview text which is displayed when the listview contains no items.
  • If NSUB == 2 when N == -1 then redraw after setting empty text.

/xdid -w
This command lets you add an icon to the listview image lists.
Syntax:
/xdid -w [DNAME] [ID] [+FLAGS] [INDEX] [FILENAME]
Example:
/xdid -w dcx 4 +n 113 shell32.dll
/xdid -w dcx 4 +no2 29 shell32.dll
Parameters:
+FLAGS Image list flags.
n Normal icon list.
s State icon list.
o Overlay icon list. The overlay index is declared immediately after the +o flag. Must be used with +n.
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.
  • For readability and ease of indexing, it is suggested you declare your overlay icons AFTER the normal icons. Overlay icons are also added to the normal icon list, so it will mess up your existing icon indexes.
  • There is a limit of 15 overlay icons you may use, indexes from 1 to 15.

/xdid -y
This command lets you clear the listview image lists.
Syntax:
/xdid -y [DNAME] [ID] [+FLAGS]
Example:
/xdid -y dcx 4 +ns
Parameters:
+FLAGS Image list flags
n Normal icon list.
s State icon list.

/xdid -z
This command lets you sort the data in the listview control.
Syntax:
/xdid -z [DNAME] [ID] [+FLAGS] [COLUMN] (ALIAS)
Example:
/xdid -z dcx 4 +ca 2 lvsort
Parameters:
+FLAGS Sort flags.
a Ascendant order sorting. (Default)
c Custom sorting provided by ALIAS.
d Descendant order sorting.
n Numerical sorting.
s Case-sensitive sorting. (With Alpha-numeric)
t Alpha-numeric sorting. (Default)
COLUMN Column to be used for sorting.
ALIAS Alias name to be called in the case of custom sorting.
 
Note.
  • ALIAS is not needed if not using a custom sorting algorithm.
  • When using +c, sorted values given by $1 and $2 into ALIAS.
  • The custom alias must return the following values for the comparison of custom values. The ascendant or descendant order is managed by the DLL with the given values returned.
    $1 < $2 return -1
    $1 > $2 return 1
    $1 == $2 return 0

/xdid -A
This command lets you set a property on a specific (sub)item.
Syntax:
/xdid -A [DNAME] [ID] [ROW] [COLUMN] [+FLAGS] [INFO]
Example:
/xdid -A dcx 4 4 2 +M Marked text here
Parameters:
+FLAGS Property flags.
M Marked text property. Much like /xdid -M, this can be used to define custom data but on a per (sub)item basis.
INFO The information to set. The usage of this parameter depends on the flags specified in FLAGS.

/xdid -B
This command lets you force label editing on a listview item.
Syntax:
/xdid -B [DNAME] [ID] [N]
Example:
/xdid -B dcx 4 3

/xdid -G
This command lets you change a groups state.
Syntax:
/xdid -G [DNAME] [ID] [GID] [+MASK] [+STATES]
Example:
/xdid -G dcx 4 1 +O +O
Parameters:
GID ID of the group to change
+MASK The mask of group states to affect
C Collapsible
H Hidden
N No header
O Collapsed
S Selected
+STATES The group states to enable
C Collapsible
H Hidden
N No header
O Collapsed
S Selected
 
Note. Only states included in +MASK will be changed. If a state is included in +MASK but not in +STATES then it will be removed.

/xdid -H
This command lets you set the header settings.
Syntax:
/xdid -H [DNAME] [ID] [COL|COL1-COL2|COL1,COL2|COL1,COL2-COL3 etc..] [+FLAGS] [ARGS]
Example:
/xdid -H dcx 4 1 +s sortdown unchecked
Parameters:
COL|COL1-COL2|COL1,COL2|COL1,COL2-COL3 The column number(s) to change the header for.
+FLAGS The action to take.
s Change header style
ARGS The arguments for the given +FLAGS
sortdown Change the header to show a sort down arrow. (can't be used with sortup or nosort)
sortup Change the header to show a sort up arrow. (can't be used with sortdown or nosort)
nosort Change the header to not show any sort arrow. (can't be used with sortup or sortdown)
checkbox Change the header to show a checkbox. (can't be used with nocheckbox)
nocheckbox Change the header to not show a checkbox. (can't be used with checkbox)
checked Change the header to show a selected checkbox. (can't be used with nocheckbox or unchecked)
unchecked Change the header to show a unselected checkbox. (can't be used with nocheckbox or checked)
 
Note. Only +s flag is supported atm, so only styles can be changed.

/xdid -Q
This command lets you add, move, & delete groups.
Syntax:
/xdid -Q [DNAME] [ID] Add [N] [+FLAGS] [GID] [GROUPTEXT]|Move [GID] [N]|Del [GID]
Example:
/xdid -Q dcx 4 Add 1 +l 101 Group 101!
/xdid -Q dcx 4 Move 101 4
/xdid -Q dcx 4 Del 101
Parameters:
N Group index order.
+FLAGS Group flags.
c Group text is centered.
l Group text is left aligned.
r Group text is right aligned.
GID ID that identifies the group when adding items in /xdid -a.
GROUPTEXT Label for the group.

/xdid -S
This command lets you save the items in a listview to file/@window/hashtable/xml
Syntax:
/xdid -S [DNAME] [ID] [+FLAGS] [N1] [N2] [ARGS]
Example:
/xdid -S dcx 4 +f 1 20 listview.txt
Parameters:
+FLAGS Type of save to do...
c Save to a custom window.
f Save to a file. (Data is appended to an existing file or a new file is created)
h Save to a hashtable. (Table must exist)
x Save to an xml file. (Data is appended to the bottom of the window, window must exist)
N1 Start of the item range to save.
N2 End of the item range to save.
ARGS Arguments dependant on +FLAGS
c @window
f filename
h hashtable
x dataset_name filename
 
Note. This command is incomplete. +x does not work at this time.

/xdid -T
This command lets you set a tooltip for a specific item.
Syntax:
/xdid -T [DNAME] [ID] [N] [NSUB] (TOOLTIP)
Example:
/xdid -T dcx 4 2 1 This tooltip applies to Item 2
 
Note. This currently only works for the first column.

/xdid -V
This command lets you scroll to the item specified.
Syntax:
/xdid -V [DNAME] [ID] [N] (NSUB)
Example:
/xdid -V dcx 4 5
/xdid -V dcx 4 5 3
Parameters:
N Item row to make visible.
NSUB Optional subitem to make visible.

/xdid -W
This command lets you change the viewing mode.
Syntax:
/xdid -W [DNAME] [ID] [MODE]
Example:
/xdid -W dcx 4 icon
Parameters:
MODE The mode to change to.
icon Changes the listview to icon view.
list Changes the listview to item list view.
report Changes the listview to report view.
smallicon Changes the listview to smallicon view.

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().columnorder
This property lets you retreive the order of the Nth listview column.
Syntax:
$xdid(dialog, ID, (N)).columnorder
Example:
$xdid(dcx, 4, 2).columnorder
 
Note. When N is not specified, the order of all columns are returned.

$xdid().columns
This property lets you retreive the number of columns for the listview.
Syntax:
$xdid(dialog, ID).columns
Example:
$xdid(dcx, 4).columns
 
Note.
  • If a listview is not a report listview, this will return 0.
  • If a listview has noheader, this will return 0.

$xdid().find
This property lets you retreive the listview item index and column index of the Nth found listview item matching the input search patern.
Syntax:
$xdid(dialog, ID, [TAB]Matchtext[TAB], T, COLUMN, N).find
Example:
$xdid(dcx, 4, $chr(9) *Item* $chr(9), W, 0, 3).find
Parameters:
MATCHTEXT String composed of wildcards or regex paterns used for the search.
T Value indicating if the search is using a regex patern or wildcard string.
E Matchtext is an exact match.
W Matchtext is a wildcard string.
R Matchtext is a regex patern.
COLUMN Parameter indicating the column to search.
N Parameter indicating to return the Nth match.
 
Note.
  • If COLUMN is 0, searchs through all columns.
  • If N is 0, returns the total number of matching items.
  • The [TAB] characters surrounding the matchtext are mandatory or else it wont work.
  • The global search including all columns goes left to right, line by line, starting at the top.

$xdid().genabled
This property lets you retreive whether groups are enabled or not.
Syntax:
$xdid(dialog, ID).genabled
Example:
$xdid(dcx, 4).genabled

$xdid().gnum
This property retreives the number of groups.
Syntax:
$xdid(dialog, ID).gnum
Example:
$xdid(dcx, 4).gnum

$xdid().hicon
This property lets you retreive the Nth listview header icon index.
Syntax:
$xdid(dialog, ID, N).hicon
Example:
$xdid(dcx, 4, 2).hicon

$xdid().hstate
This property lets you retreive the state of the Nth listview header.
Syntax:
$xdid(dialog, ID, N).hstate
Example:
$xdid(dcx, 4, 2).hstate
 
Note. If you are not using headers an error 'Unable to get Header Window' is returned. Otherwise, returns a combination of sortdown (sortdown arrow shown), sortup (sort up arrow shown), or dropdown (split button shown) or checkbox (checkbox shown) or checked (checkbox shown & checked).

$xdid().htext
This property lets you retreive the Nth listview header text.
Syntax:
$xdid(dialog, ID, [N]).htext
Example:
$xdid(dcx, 4, 2).htext

$xdid().hwidth
This property lets you retreive the Nth listview header width.
Syntax:
$xdid(dialog, ID, (N)).hwidth
Example:
$xdid(dcx, 4, 2).hwidth
 
Note. When N is not specified, all column widths are returned in their viewing order.

$xdid().icon
This property lets you retreive a Nth listview item icon number.
Syntax:
$xdid(dialog, ID, N, NSUB).icon
Example:
$xdid(dcx, 4, 1, 2).icon

$xdid().markeditem
This property lets you retreive the marked (see /xdid -A +M) text for the listview (sub)item specified.
Syntax:
$xdid(dialog, ID, [ROW] [COLUMN]).markeditem
Example:
$xdid(dcx, 4, 3, 1).markeditem

$xdid().mouseitem
This property lets you retreive the index of the item (and subitem) which the mouse pointer is over.
Syntax:
$xdid(dialog, ID).mouseitem
Example:
$xdid(dcx, 4).mouseitem
 
Note. Returns 0 if mouse is not over any item.

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

$xdid().pbar
This property lets you retreive ProgressBar properties from a specific cell.
Syntax:
$xdid(dialog, ID, N, NSUB, PBARPROP).pbar
Example:
$xdid(dcx, 4, 3, 1, value).pbar

$xdid().sel
This property lets you retreive the indexes of selected items in the listview.
Syntax:
$xdid(dialog, ID, (N)).sel
Example:
$xdid(dcx, 4, 2).sel
Parameters:
N Optional parameter allowing you to obtain the Nth selected index.
 
Note.
  • If the listview is multiline, and N is not supplied, then this command will return a comma-separated list of the selected indexes.
  • If N is 0, then this will return the number of lines selected. (Same as $xdid().selnum)
  • When using this property without N, the result is limited to 900 characters. This is due to an implementation that mIRC has imposed on DLL communication, so it is advised to use the N parameter to prevent inaccurate results.

$xdid().selected
This property lets you determine if the specified item is selected or not.
Syntax:
$xdid(dialog, ID, [N]).selected
Example:
$xdid(dcx, 4, 2).selected

$xdid().selnum
This property lets you retreive the number of selected items in the listview.
Syntax:
$xdid(dialog, ID).selnum
Example:
$xdid(dcx, 4).selnum

$xdid().seltext
This property lets you retreive the selected listview item text.
Syntax:
$xdid(dialog, ID, (NSUB)).seltext
Example:
$xdid(dcx, 4, 3).seltext
 
Note. If NSUB is not specified, it will return the first column.

$xdid().state
This property lets you retreive the check item state of the Nth listview item.
Syntax:
$xdid(dialog, ID, N).state
Example:
$xdid(dcx, 4, 2).state
 
Note. If you are not using the checkbox style, the value returned is the state icon value. Otherwise, returns 2 (checked), 1 (unchecked), or 0 (no check).

$xdid().tbitem
This property lets you retreive top and bottom visible item indexes.
Syntax:
$xdid(dialog, ID).tbitem
Example:
$xdid(dcx, 4).tbitem
 
Note. Returns 0 for no items or error.

$xdid().text
This property lets you retreive a Nth listview item text.
Syntax:
$xdid(dialog, ID, N, (NSUB)).text
Example:
$xdid(dcx, 4, 1, 2).text
 
Note. If NSUB is not specified, it will return the first column.

Listview Events
These events are fired when activity occurs in the Listview control.
dclick
When an item is double clicked
Syntax:
/cb_alias DNAME dclick ID ITEM SUBITEM
Example:
/cb_alias dcx dclick 4 4 2
Parameters:
ITEM Item number where the event was triggered.
SUBITEM Column index where the event was triggered.
 
Note. This event does not require an item to be clicked on to be triggered. If no item was double clicked, no index is returned.

deselected
Triggered when an item is deselected.
Syntax:
/cb_alias DNAME deselected ID LINE COLUMN
Example:
/cb_alias dcx deselected 4 4 2
Parameters:
LINE The line selected.
COLUMN The column selected.
 
Note. COLUMN will always return 1 until a workaround is found.

hdclick
When the user double clicks on a header item in the listview.
Syntax:
/cb_alias DNAME hdclick ID N
Example:
/cb_alias dcx hdclick 4 2
Parameters:
N Header item index.

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

hover
When the mouse is hovering over the listview.
Syntax:
/cb_alias DNAME hover ID ITEM SUBITEM
Example:
/cb_alias dcx hover 4 4 2
Parameters:
ITEM Item number where the event was triggered.
SUBITEM Column index where the event was triggered.
 
Note. This event does not require an item to be hovered over to be triggered. If the mouse is not over an item, no index is returned.

hsclick
When the user clicks on a header item in the listview.
Syntax:
/cb_alias DNAME hsclick ID N
Example:
/cb_alias dcx hsclick 4 2
Parameters:
N Header item index.

keydown
When the user presses a key and the listview has focus.
Syntax:
/cb_alias DNAME keydown ID KEYCODE
Example:
/cb_alias dcx keydown 4 65
Parameters:
KEYCODE The ASCII equivelant of the key pressed. This is not case-sensitive.
Returnnospace to prevent spacebar (when KEYCODE is 32) from changing item checkbox state.

labelbegin
When item text label editing begins.
Syntax:
/cb_alias DNAME labelbegin ID ITEM SUBITEM
Example:
/cb_alias dcx labelbegin 4 3 1
Returnnoedit to block label editing.
 
Note. Currently only the first column is editable.

labelcancel
When the user presses ESC while editing or clicks somewhere else without editing the text.
Syntax:
/cb_alias DNAME labelcancel ID
Example:
/cb_alias dcx labelcancel 4

labelend
When the user clicks elsewhere or presses RETURN while editing or clicks somewhere else but edited the text.
Syntax:
/cb_alias DNAME labelend ID VALUE
Example:
/cb_alias dcx labelend 4 New text value
Parameters:
VALUE Edited text label.
Returnnoedit to cancel label editing (for example if string is NULL or invalid to your application).

rclick
When the listview is right clicked.
Syntax:
/cb_alias DNAME rclick ID ITEM SUBITEM
Example:
/cb_alias dcx rclick 4 4 2
Parameters:
ITEM Item number where the event was triggered.
SUBITEM Column index where the event was triggered.
 
Note. This event does not require an item to be clicked on to be triggered. If no item was right clicked, no index is returned.

rdclick
When the listview is double right-clicked.
Syntax:
/cb_alias DNAME rdclick ID ITEM SUBITEM
Example:
/cb_alias dcx rdclick 4 4 2
Parameters:
ITEM Item number where the event was triggered.
SUBITEM Column index where the event was triggered.
 
Note. This event does not require an item to be clicked on to be triggered. If no item was double-right clicked, no index is returned.

sclick
When an item is single clicked.
Syntax:
/cb_alias DNAME sclick ID ITEM SUBITEM
Example:
/cb_alias dcx sclick 4 4 2
Parameters:
ITEM Item number where the event was triggered.
SUBITEM Column index where the event was triggered.
 
Note. This event does not require an item to be clicked on to be triggered. If no item was clicked clicked, no index is returned.

scrollend
When the user has finished scrolling the vertical scrollbar in the listview.
Syntax:
/cb_alias DNAME scrollend ID
Example:
/cb_alias dcx scrollend 4

selected
Triggered when you select an item.
Syntax:
/cb_alias DNAME selected ID LINE COLUMN
Example:
/cb_alias dcx selected 4 4 2
Parameters:
LINE The line selected.
COLUMN The column selected.
 
Note. COLUMN will always return 1 until a workaround is found.

stateclick
When a checkbox is clicked.
Syntax:
/cb_alias DNAME stateclick ID ITEM
Example:
/cb_alias dcx stateclick 4 3
Parameters:
ITEM Item number where the event was triggered.

trackbegin
When a header item is being resized.
Syntax:
/cb_alias DNAME trackbegin ID N
Example:
/cb_alias dcx trackbegin 4 2
Returnnotrack to cancel resizing.

Contact © 2005-2022 Last Updated: 19th November, 22

Valid XHTML 1.0 Transitional Valid CSS!