- Index
- General Usage
- DCX Controls
- DCX Features
- About DCX
|
RichEdit |
This control enables you to create a richedit. The richedit interprets the mIRC control codes to display the colors and bold/underline effects. The richedit control loads it's internal Color Palette as the actual mIRC colors as default behavior. You can modify the colors using the /xdid commands.
The Color Palette is the richedit's internal color list of 16 values used to process mIRC color codes and convert them to disaplyed colors.
|
Control Styles |
| These control styles are available when creating a RichEdit control. Remember that the general styles disabled, group, notheme, tabstop and transparent apply to all DCX controls. |
| autohs |
Text scrolling is automatically scrolled horizontally without need of a horizontal scrollbar. |
| autovs |
Text scrolling is automatically scrolled vertically without need of a vertical scrollbar. |
| center |
Text is centered. |
| hsbar |
Displays a horizontal scrollbar. |
| multi |
Enables a multiline richedit. |
| readonly |
Text cannot be edited manually. |
| right |
Text is right justified. |
| tooltips |
The richedit will have a tooltip. |
| vsbar |
Displays a vertical scrollbar. |
/xdid flags |
| Control commands are input to the control with the /xdid command. |
|
/xdid -a |
| This command lets you add text to the end of the richedit. |
| Syntax: |
/xdid -a [DNAME] [ID] [TEXT] |
| Example: |
/xdid -a dcx 4 New Text |
|
/xdid -c |
| This command will copy the text in the edit to the clipboard. |
| Syntax: |
/xdid -c [DNAME] [ID] |
| Example: |
/xdid -c dcx 4 |
|
/xdid -d |
| This command lets you delete the Nth line of text in the richedit. |
| Syntax: |
/xdid -d [DNAME] [ID] [N] |
| Example: |
/xdid -d dcx 4 2 |
| | | Note. Only works with multi |
|
/xdid -i |
| This command lets you insert a line at the Nth position in the richedit. |
| Syntax: |
/xdid -i [DNAME] [ID] [N] [TEXT] |
| Example: |
/xdid -i dcx 4 2 New Text |
| | | Note. If the multi style is not used, overwrites all text. |
|
/xdid -k |
| This command lets you change the richedit background color. |
| Syntax: |
/xdid -k [DNAME] [ID] [RGB] |
| Example: |
/xdid -k dcx 4 $rgb(255,0,0) |
| | | Note. Use -1 to revert to default. |
|
/xdid -l |
| This command lets you change a color in the richedit palette. |
| Syntax: |
/xdid -l [DNAME] [ID] [N] [RGB] |
| Example: |
/xdid -l dcx 4 5 $rgb(255,0,0) |
| Parameters: |
| N |
An index between 1-16 |
|
/xdid -m |
| This command lets you load the mIRC color palette into the richedit. |
| Syntax: |
/xdid -m [DNAME] [ID] |
| Example: |
/xdid -m dcx 4 |
|
/xdid -n |
| This command lets you toggle the automatic hyperlinking of urls to enable the link event. |
| Syntax: |
/xdid -n [DNAME] [ID] [ENABLED] |
| Example: |
/xdid -n dcx 4 1 |
|
/xdid -o |
| This command lets you overwrite the Nth line in the richedit. |
| Syntax: |
/xdid -o [DNAME] [ID] [N] [TEXT] |
| Example: |
/xdid -o dcx 4 5 New Text |
| | | Note. If the multi style is not used, overwrites all text. |
|
/xdid -q |
| This command lets you load a custom palette into the richedit control. |
| Syntax: |
/xdid -q [DNAME] [ID] [COLOR1] [COLOR2] ... [COLOR16] |
| Example: |
/xdid -q dcx 4 2 $rgb(255,0,0) |
| | Note.- The number of colors is limited to 16, everything past the 16th color is ignored.
- You can give the command a number of colors inferior to 16, it will then only add thoses colors in order to the palette starting at 1.
|
|
/xdid -r |
| This command lets you clear the contents of the richedit. |
| Syntax: |
/xdid -r [DNAME] [ID] |
| Example: |
/xdid -r dcx 4 |
|
/xdid -t |
| This command lets you load the contents of a file directly in the richedit. |
| Syntax: |
/xdid -t [DNAME] [ID] [FILENAME] |
| Example: |
/xdid -t dcx 4 C:\mIRC\blah.txt |
|
/xdid -u |
| This command lets you save the contents of the richedit directly in a file. |
| Syntax: |
/xdid -u [DNAME] [ID] [FILENAME] |
| Example: |
/xdid -u dcx 4 C:\mIRC\blah.txt |
|
/xdid -S |
| This command lets you set the selection range in the richedit. |
| Syntax: |
/xdid -S [DNAME] [ID] [START] [END] |
| Example: |
/xdid -S dcx 4 1 3 |
|
/xdid -Z |
| This command lets you zoom the text of the richedit. |
| Syntax: |
/xdid -Z [DNAME] [ID] [NUMERATOR] [DENOMINATOR] |
| Example: |
/xdid -Z dcx 4 200 100 |
| | | Note. The percentage of zooming is calculated by dividing the numerator by denominator (NUMERATOR / DENOMINATOR * 100) |
$xdid() Properties |
| The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls. |
|
$xdid().caretpos |
| This property lets you retreive the position of the cursor. |
| Syntax: |
$xdid(dialog, ID, LINE COLUMN).caretpos |
| Example: |
$xdid(dcx, 4, 14 3).caretpos |
|
$xdid().num |
| This property lets you retreive the number of lines in the richedit. |
| Syntax: |
$xdid(dialog, ID).num |
| Example: |
$xdid(dcx, 4).num |
|
$xdid().sel |
| This returns the index of the first and last selected character position in the control. |
| Syntax: |
$xdid(dialog, ID).sel |
| Example: |
$xdid(dcx, 4).sel |
|
$xdid().selend |
| This returns the index of the last selected character position in the control. |
| Syntax: |
$xdid(dialog, ID).selend |
| Example: |
$xdid(dcx, 4).selend |
|
$xdid().selstart |
| This returns the index of the first selected character position in the control. |
| Syntax: |
$xdid(dialog, ID).selstart |
| Example: |
$xdid(dcx, 4).selstart |
|
$xdid().seltext |
| This returns the selected text in the control. |
| Syntax: |
$xdid(dialog, ID).seltext |
| Example: |
$xdid(dcx, 4).seltext |
|
$xdid().text |
| This property lets you retreive the Nth line in the richedit or the whole richedit text. |
| Syntax: |
$xdid(dialog, ID, N).text |
| Example: |
$xdid(dcx, 4, 1).text |
| | | Note. If the multi style is not used, you can ignore the N parameter to retrieve the richedit text. |
RichEdit Events |
| These events are fired when activity occurs in the RichEdit control. |
|
help |
| Launched when you click on a control using the ? contexthelp button. |
| Syntax: |
/cb_alias DNAME help ID |
| Example: |
/cb_alias dcx help 4 |
|
keydown |
| When a key is pressed in the richedit control. |
| Syntax: |
/cb_alias DNAME keydown ID KEYCODE |
| Example: |
/cb_alias dcx keydown 4 64 |
|
keyup |
| When a key is unpressed in the richedit control. |
| Syntax: |
/cb_alias DNAME keyup ID KEYCODE |
| Example: |
/cb_alias dcx keyup 4 64 |
|
lbup |
| When the left mouse button is released. |
| Syntax: |
/cb_alias DNAME lbup ID |
| Example: |
/cb_alias dcx lbup 4 |
|
link |
| When a link is clicked. |
| Syntax: |
/cb_alias DNAME link ID EVENT LINK |
| Example: |
/cb_alias dcx link 4 sclick http://dcx.scriptsdb.org |
| Parameters: |
| EVENT |
Mouse event which triggered the callback |
| sclick |
Single left click. |
| dclick |
Double left click. |
| rclick |
Single right click. |
| LINK |
The URL which was clicked. |
|
rclick |
| When the right mouse button is clicked on the richedit control. |
| Syntax: |
/cb_alias DNAME rclick ID |
| Example: |
/cb_alias dcx rclick 4 |
|
return |
| When the Enter key is pressed in the richedit control. |
| Syntax: |
/cb_alias DNAME return ID |
| Example: |
/cb_alias dcx return 4 |
|
sclick |
| When the left mouse button is clicked. |
| Syntax: |
/cb_alias DNAME sclick ID |
| Example: |
/cb_alias dcx sclick 4 |
|
selchange |
| When the selection range is changed. |
| Syntax: |
/cb_alias DNAME selchange ID START END TEXT |
| Example: |
/cb_alias dcx selchange 4 2 6 cdef |
| Parameters: |
| START |
The starting position of the selection range. |
| END |
The ending position of the selection range. |
| TEXT |
The text selected. |
|