NTControls22.CodeEdit ActiveX Control


Identification

NTControls22.CodeEdit

Description

CodeEdit is a TextBox that is color enabled for JavaScript and VBScript to make editing an ease of instinctive interest in innate vision separation difference. It also supports error highlighting and plain black text. Note: NTControls22 Objects are ActiveX Controls only for Visual Basic and are not available in the MaxIDE Environment.

Enumerators

ColoringIndexes

TextIndex = 0
VariableIndex = 1
StatementIndex = 2
ValueIndex = 3
OperatorIndex = 4
CommentIndex = 5
ErrorIndex = 6
Dream1Index = 7
Dream2Index = 8
Dream3Index = 9
Dream4Index = 10
Dream5Index = 11
Dream6Index = 12

Events

Change ()

Description

Occurs when the text has changed.

Click ()

Description

Occurs when the control is clicked.

DblClick ()

Description

Occurs when the control is double clicked.

KeyDown (KeyCode, Shift)

Parameters

KeyCode Integer

The KeyCode of the key event that occurred.

Shift Integer

The shift state of the keyboard when the key event occurred.

Description

This event occurs when the user presses a key just before the KeyPress and KeyUp event.

KeyPress (KeyAscii)

Parameters

Percent Integer

The ASCII code of the key pressed.

Description

This event occurs when the user presses a key just after the KeyDown and just before the KeyUp event.

KeyUp (KeyCode, Shift)

Parameters

KeyCode Integer

The KeyCode of the key event that occurred.

Shift Integer

The shift state of the keyboard when the key event occured.

Description

This event occurs when the user presses a key just after the KeyDown and KeyPress event.

QueryDefine (Line, Text, Color)

Parameters

Line Long

The number of the line for which the QueryDefine event is being called.

Text String

The text contents contained on the line before any alteration has occured, this argument does accept changes, and the line does not contain any carriage returns or line feed. Any end of line delimiter attached to the Text argument and passed back is ignored as well as anything after it. ColoringIndexes can be set at any point in the line Text by the RichText formula of appending, without space, the ColoringIndex converted to a numerical to the string \cf, then appending a space. For example "\cf12 This line is the color of ColorDream6 property!"

Color ColoringIndex

The base color index of ColoringIndexes values of the line for which the QueryDefine event is being called. This argument does accept changes.

Description

This event occurs when the user presses a key just after the KeyDown and KeyPress event.

Properties

Dirty (Boolean)

Description

The changed state of the text, whether it has become Dirty according to the undo queue.

MaxUndo (Boolean)

Description

Sets the maximum amount of the undo events that can queue.

Locked (Boolean)

Description

Sets whether the text is locked from editing.

BackColor (Long)

Description

Gets or sets the BackColor of the text control.

ForeColor (Long)

Description

Gets or sets the ForeColor of the text control (This property is the non-specific PlainText equivalent as the ColorText property is in language specific colors).

ColorText (String)

Description

Gets or sets the default (full draft) text color of the control if no language is set.

ColorVariable (String)

Description

Gets or sets the color of any named Variable type of elements, most commonly referred to as user defined, of the currently set language.

ColorStatement (String)

Description

Gets or sets the color of any Statement element of the currently set language.

ColorValue (String)

Description

Gets or sets the color of any Value element of the currently set language.

ColorOperator (String)

Description

Gets or sets the color of any Operator element of the currently set language.

ColorComment (String)

Description

Gets or sets the color of any Comment element of the currently set language.

ColorError (String)

Description

Gets or sets the color of the Error line when provided.

LineDefines([LineNumber]) (ColoringIndexes)

Description

A respective index representation to the colors elements available that may be set per each line of text when the language is set to Defined, or Custom. Omitting the line number when setting the index will set all lines to the specified index, omitting the line number while retrieving the index will result in the current line the caret is on. The ColoringIndexes refers to any respective Color---- property, starting with ColorText at 0 and ending with ColorDream6 at 12.

AutoRedraw (Boolean)

Description

Gets or sets whether the Color properties automatically addresses repainting when they are modified, set this to False and use the Redraw for a broader ranged control over the text painting.

LineNumber (Long) (ReadOnly)

Description

Gets the current line number of the cursor in the control.

SelText (String)

Description

Gets or sets the currently selected text of the control.

SelStart (Long)

Description

Gets or sets the start of the cursor selection in the control.

SelLength (Long)

Description

Gets or sets the length of the cursor selection in the control.

Enabled (Boolean)

Description

Gets or sets whether the control is enabled or not.

TextRTF (String) (ReadOnly)

Description

Gets the Rich Text Format of the text in the control.

Language (String)

Description

Gets or sets the language to be colored of the control, possible colorable language values are ("Unknown", "JScript", "VBScript", "Rainbow" and "Defined") Unknown behaves like PlainText, JScript and VBScript behave like their lexicon using the first six Color Indexes. Rainbow and Defined are line based adaptations that use the Dream Color Indexes. Rainbow colors each line from start to finish of the Dream colors 1 through 6 and repeats indefinitely. Defined allows custom line colors individually with a total of 12 possible different colors using the entire Color Index, by index and not by color.

Text (String)

Description

Gets or sets the text value of the control.

ErrorLine (Long)

Description

Gets or sets the line number to be colored as the Error Color.

SelectRow (CursorRow [, FullRowCol])

Parameters

CursorRow Long

The row to select.

 

[FullRowCol] Long

Default value is true which selects the entire row, or the provided number becomes the SelLength against the cursor position found.

Description

Selects a row of text in the control.

FileName (String)

Description

Setting the FileName to a valid path will set the text contents to the file contents; this property does not alter or save file contents in any way. After set to a valid file location, and the contents of the file have finished loading, this value will return to empty string indicating completion. This property can be more effective visually then use of the Text property in loading times when dealing with larger text sizes because it buffers as it loads.

Functions

TabIndent (Add)

Parameters

Add Boolean

Whether or not the selected lines of text will have beginning tabs added or removed.

Description

Adds or removes tabs to the selected lines of text.

Comment (Add)

Parameters

Add Boolean

Whether or not the selected lines of code text will have beginning Comment characters added or removed.

Description

Adds or removes Comments to the selected lines of code text.

CanUndo (Boolean)

Description

Gets whether or not the Undo action is available.

CanRedo (Boolean)

Description

Gets whether or not the Redo action is available.

Undo

Description

Performs the Undo action if it is available.

Redo

Description

Performs the Redo action if it is available.

Redraw

Description

Repaints the control addressing all text coloring for which the control is setup, by default this function is not necessary. Use this function in conjunction with the AutoRedraw property to gauge a more custom flow control of the visual painting rate.