LitDev Extension API

Geography LD3DView LDArray LDBits LDBlueTooth
LDCall LDChart LDClient LDClipboard LDColours
LDCommPort LDController LDControls LDCursors LDDataBase
LDDateTime LDDebug LDDialogs LDDictionary LDEffect
LDEmail LDEncryption LDEvents LDFastArray LDFastShapes
LDFigures LDFile LDFocus LDftp LDGeography
LDGraph LDGraphicsWindow LDHashTable LDHID LDIcon
LDImage LDInline LDIOWarrior LDList LDLogic
LDMath LDMathX LDMatrix LDMusic LDNetwork
LDPhysics LDProcess LDQueue LDRegex LDResources
LDScrollBars LDSearch LDServer LDSettings LDShapes
LDShell LDSort LDSound LDSpeech LDStatistics
LDStopwatch LDText LDTextWindow LDTimer LDTranslate
LDUnits LDUtilities LDVector LDWaveForm LDWebCam
LDWindows LDxml LDZip

LDControls
Controls for the GraphicsWindow.

AddBrowser AddCheckBox AddComboBox
AddContextMenu AddDataView AddDocumentViewer
AddListBox AddListView AddMediaPlayer
AddMenu AddPasswordBox AddProgressBar
AddRadioButton AddRichTextBox AddSlider
AddTreeView AllowDrop BrowserHistory
BrowserNavigate BrowserPageLoaded BrowserSetURL
CheckBoxChanged CheckBoxGetState CheckBoxState
ComboBoxContent ComboBoxGetSelected ComboBoxItemChanged
ComboBoxSelect ContextMenuClicked DataViewAllowSort
DataViewAllowUserEntry DataViewButtonClicked DataViewCellValueChanged
DataViewClear DataViewColAlignment DataViewColumnReadOnly
DataViewColumnSort DataViewColumnVisible DataViewColumnWidths
DataViewDeleteRow DataViewGetFocus DataViewGetRow
DataViewGetSelected DataViewGetValue DataViewReadFromCSV
DataViewRowColours DataViewRowCount DataViewSaveAsCSV
DataViewSelectionChanged DataViewSetColumnButton DataViewSetColumnCheckBox
DataViewSetColumnComboBox DataViewSetFocus DataViewSetRow
DataViewSetValue DocumentViewerLoadXPS FileDropped
LastBrowser LastBrowserPage LastCheckBox
LastCheckBoxState LastComboBox LastComboBoxIndex
LastContextControl LastContextItem LastDataBaseTable
LastDataView LastDataViewButtonClicked LastDataViewCellValueChanged
LastDropFiles LastDropShape LastListBox
LastListBoxIndex LastListView LastListViewColumn
LastListViewRow LastMediaPlayer LastMenuControl
LastMenuItem LastPassword LastPasswordBox
LastRadioButton LastRadioButtonGroup LastRichTextBox
LastSlider LastSliderValue LastTreeView
LastTreeViewIndex ListBoxContent ListBoxGetSelected
ListBoxItemChanged ListBoxSelect ListBoxSelectionMode
ListViewClear ListViewColAlignment ListViewDeleteRow
ListViewEdit ListViewGetRow ListViewRowCount
ListViewSelectionChanged ListViewSetRow MediaPlayerEnded
MediaPlayerLoad MediaPlayerOpened MediaPlayerPause
MediaPlayerPlay MediaPlayerPlayTime MediaPlayerPosition
MediaPlayerSeek MediaPlayerSpeed MediaPlayerStop
MediaPlayerStretch MediaPlayerVolume MenuBackground
MenuChecked MenuClicked PasswordEntered
ProgressBarValue RadioButtonClicked RadioButtonGet
RadioButtonSet RichTextBoxCaseSensitive RichTextBoxClear
RichTextBoxDefault RichTextBoxFontBackground RichTextBoxFontBold
RichTextBoxFontFamily RichTextBoxFontForeground RichTextBoxFontItalic
RichTextBoxFontSize RichTextBoxFontUnderline RichTextBoxGetText
RichTextBoxIndentToTab RichTextBoxLoad RichTextBoxMargins
RichTextBoxReadOnly RichTextBoxSave RichTextBoxSelection
RichTextBoxSetText RichTextBoxTextAlignment RichTextBoxTextTyped
RichTextBoxWord SetButtonStyle SetCursorPosition
SetCursorToEnd SetSpellCheck SliderChanged
SliderGetValue SliderMaximum SliderValue
TextBoxReadOnly TextBoxTab TreeViewContent
TreeViewEdit TreeViewExpand TreeViewGetData
TreeViewGetSelected TreeViewItemChanged TreeViewSelect

AddBrowser(width,height,url)
Add a web browser.
width The browser width.
height The browser height.
url The html pane to load (e.g. http://smallbasic.com or www.google.com)
returns The browser control name.

AddCheckBox(title)
Add a checkbox dialog control.
title The title of the control.
returns The checkbox shape name.

AddComboBox(list,width,height)
Add a combobox dialog control.
list An array containing the combobox data.

The first index is the row or node number and the value of the array is the display text at the current node.

list[1] = "Option 1"
list[2] = "Option 2"
list[3] = "Option 3"
list[4] = "Option 4"

width The width of the control.
height The drop down height of the control.
returns The combobox shape name.

AddContextMenu(shapeName,items,images)
Add a right click context menu for a control or shape that supports context menus.
shapeName The control or shape name.
items An array of context menu item selection texts.
images Optional array of image icons, any or all may be "".
They may be the result of ImageList.LoadImage or local or network image file.


AddDataView(width,height,headings)
Add a dataview control.
All rows and columns are indexed from 1.
This control always appears on top of all other objects in the GraphicsWindow.

width The width of the control.
height The height of the control.
headings An array of headings for the dataview.
returns The dataview shape name.

AddDocumentViewer(width,height)
Add a document viewer dialog control.
You can view XPS documents (MS version of PDF) with this.
Drag and drop is auto set for this control.

width The width of the control.
height The height of the control.
returns The document viewer shape name.

AddListBox(list,width,height)
Add a listbox dialog control.
list An array containing the listbox data.

The first index is the row or node number and the value of the array is the display text at the current node.

list[1] = "Option 1"
list[2] = "Option 2"
list[3] = "Option 3"
list[4] = "Option 4"

Alternatively, this can be a LDArray or LDList.

width The width of the control.
height The height of the control.
returns The listbox shape name.

AddListView(width,height,headings)
Add a ListView control.
width The width of the control.
height The height of the control.
headings An array of headings for the listview.
returns The listview shape name.

AddMediaPlayer(width,height)
Add a media player (to play videos etc).
Drag and drop is auto set for this control.

width The media player width.
height The media player height.
returns The media player control name.

AddMenu(width,height,menuList,iconList,checkList)
Add a menu control.
width The width of the control.
height The height of the control.
menuList An array of menu items. The index is the menu display name and the value is the parent display name.
The top level display name should be "Main". The names should be unique since they will be returned on click event.
A separator is "-", "--", "---" etc since they have to be unique and cannot be selected.

menuList["File"] = "Main"
menuList["Open"] = "File"
menuList["-"] = "File"
menuList["Exit"] = "File"
menuList["Help"] = "Main"
menuList["Show Help"] = "Help"

iconList An optional array of icon images (URL or ImageList) or "" for none.

iconList["File"] = Program.Directory+"/file.png"

checkList An optional array to identify items as checkable or "" for none.
The value is the initial checked state "True" or "False".

checkList["Show Help"] = "True"

returns The menu shape name.

AddPasswordBox(width,height,length)
Add a password box control (texbox with characters not displayed and PasswordEntered event only when return is pressed).
width The width of the control.
height The height of the control.
length The maximum number of characters in the password.
returns The password box shape name.

AddProgressBar(width,height,orientation)
Add a progress bar control.
width The width of the control.
height The height of the control.
orientation Horizontal or vertical ("H" or "V").
returns The progress bar shape name.

AddRadioButton(title,group)
Add a radio button control.
Only one radio button in a group can be set (they are exclusive).

title A text description for the radio button.
group A name to group radio buttons.
returns The radio button shape name.

AddRichTextBox(width,height)
Add a RichTextBox.
Drag and drop is auto set for this control.

width The width of the RichTextBox.
height The height of the RichTextBox.
returns The RichTextBox name.

AddSlider(width,height,orientation)
Add a slider control.
width The width of the control.
height The height of the control.
orientation Horizontal or vertical ("H" or "V").
returns The slider shape name.

AddTreeView(tree,width,height)
Add a treeview dialog control.
tree A 2D array containing the treeview data.

The first index is the row or node number and the second index is the parent node of the current node (0 for top level).
The value of the array is the display text at the current node.

tree[1][0] = "Level 1"
tree[2][1] = "Level 1 1"
tree[3][1] = "Level 1 2"
tree[4][0] = "Level 2"

width The width of the control.
height The height of the control.
returns The treeview shape name.

AllowDrop(shapeName)
Set shape to allow drag and drop.
Currently only the following are implemented without using FileDropped event to process the dropped file(s):
File path to TextBox (or file paths to MultiLineTextBox).
File opened in RichTextBox.
XPS file opened in DocumentViewer.
Image set in Image or Background.
Media for MediaPlayer (only works if valid media is already loaded).

shapeName The shape to allow drop or "Background".

BrowserHistory(shapeName)
Get an array of the browser history (pages loaded).
shapeName The browser name.
returns The array of urls in the history.

BrowserNavigate(shapeName,direction)
Move browser page forward or backwards.
shapeName The browser name.
direction "F" or "B" for forwards or backwards.

BrowserPageLoaded
Event when a browser page is loaded.

BrowserSetURL(shapeName,url)
Set a web browser page.
shapeName The browser name.
url The html pane to load (e.g. http://smallbasic.com or www.google.com)

CheckBoxChanged
Event when a checkbox is clicked.

CheckBoxGetState(shapeName)
Get a checkbox checked state.
shapeName The checkbox to get state.
returns The checkbox checked state.

CheckBoxState(shapeName,state)
Set a checkbox checked state.
shapeName The checkbox shape name.
state The checkbox check state ("True" or "False").

ComboBoxContent(shapeName,list)
Replace a combobox list.
shapeName The combobox shape name.
list An array containing the combobox data.

The first index is the row or node number and the value of the array is the display text at the current node.

list[1] = "Option 1"
list[2] = "Option 2"
list[3] = "Option 3"
list[4] = "Option 4"


ComboBoxGetSelected(shapeName)
Get a combobox selected node.
shapeName The combobox to get node.
returns The combobox selected node.

ComboBoxItemChanged
Event when a combobox selection changes or selected item is clicked.

ComboBoxSelect(shapeName,node)
Select a node in a combobox.
shapeName The combobox shape name.
node The node to select.

ContextMenuClicked
Event when a shape or control right click context menu item is selected.

DataViewAllowSort(shapeName,allow)
Allow a dataview control to be column sorted by user clicking header.
shapeName The dataview control.
allow Allow "True" (default) or disallow "False".
returns "SUCCESS" or "FAILED".

DataViewAllowUserEntry(shapeName,allow)
Allow user to add data in the last row.
shapeName The dataview control.
allow Allow user data entry "True" (default) or "False".
returns "SUCCESS" or "FAILED".

DataViewButtonClicked
Event when a dataview button is clicked.

DataViewCellValueChanged
Event when a dataview cell value changes after it is commited, for example by selecting away from the cell.

DataViewClear(shapeName)
Clear all rows in a dataview.
shapeName The dataview control.
returns "SUCCESS" or "FAILED".

DataViewColAlignment(shapeName,col,alignment)
Set the alignment for a dataview column.
shapeName The dataview control.
col The column number.
alignment "Left", "Center" or "Right"
returns "SUCCESS" or "FAILED".

DataViewColumnReadOnly(shapeName,col,readOnly)
Set a dataview column to be read only.
shapeName The dataview control.
col The column number.
readOnly Set as read only "True" or "False" (default).
returns "SUCCESS" or "FAILED".

DataViewColumnSort(shapeName,col,ascending)
Sort dataview entries by a column.
shapeName The dataview control.
col The column number to sort by.
ascending Sort ascending ("True") or descending ("False").
returns "SUCCESS" or "FAILED".

DataViewColumnVisible(shapeName,col,visible)
Set a dataview column to be visible or not.
This may be used for example to hide an id column of a database.

shapeName The dataview control.
col The column number.
visible Set as visible "True" (default) or "False".
returns "SUCCESS" or "FAILED".

DataViewColumnWidths(shapeName,widths)
Set the widths of columns.
shapeName The dataview control.
widths An array of widths for the columns, "" to reset to auto sizing.
returns "SUCCESS" or "FAILED".

DataViewDeleteRow(shapeName,row)
Delete a row from a dataview control.
shapeName The dataview control.
row The row number.
returns "SUCCESS" or "FAILED".

DataViewGetFocus(shapeName)
Get the current dataview cell with focus.
shapeName The dataview control.
returns A 1D array with the row and column number with focus, or "".

DataViewGetRow(shapeName,row)
Get a row of data from a dataview control.
shapeName The dataview control.
row The row number.
returns An array of values (one for each column) or "" on failure.

DataViewGetSelected(shapeName)
Get a list of all selected cells in a dataview.
shapeName The dataview control.
returns A 2D array of rows and columns selected.
cells[1][1] = row, cells[1][2] = column.


DataViewGetValue(shapeName,row,col)
Get a dataview cell value.
shapeName The dataview control.
row The row number.
col The column number.
returns The cell value or "".

DataViewReadFromCSV(shapeName,fileName,append)
Add data from a csv (comma separated values) text file into a dataview control.
shapeName The dataview control.
fileName The full path for the csv file.
append Append to the dataview "True" or "False".
returns "SUCCESS" or "FAILED".

DataViewRowColours(shapeName,row,background,foreground)
Set a row of data background and foreground (pen) colours.
shapeName The dataview control.
row The row number. If this is set to 0 then all alternating rows are set.
background The background colour.
foreground The foreground colour.
returns "SUCCESS" or "FAILED".

DataViewRowCount(shapeName)
Get the number of rows in a dataview control.
shapeName The dataview control.
returns The number of rows in the dataview.

DataViewSaveAsCSV(shapeName,fileName,append)
Write an entire dataview to a csv (comma separated values) text file.
shapeName The dataview control.
fileName The full path for the csv file.
append Append to the csv file "True" or "False".
returns "SUCCESS" or "FAILED".

DataViewSelectionChanged
Event when a dataview selection changes.
This event is not called for dataview button clicks, use DataViewButtonClicked.
This event is not called for dataview checkbox or combobox clicks, use DataViewCellValueChanged.


DataViewSetColumnButton(shapeName,col)
Change a dataview column control to be Buttons.
This should be set before data is added, after the dataview is created.
If the dataview is bound to a database, then set this after LDDataBase.EditTable is set.
The data for these cells will be the button title.

shapeName The dataview control.
col The column number.
returns "SUCCESS" or "FAILED".

DataViewSetColumnCheckBox(shapeName,col)
Change a dataview column control to be CheckBoxes.
This should be set before data is added, after the dataview is created.
If the dataview is bound to a database, then set this after LDDataBase.EditTable is set.
The data for these cells should be "True" or "False".

shapeName The dataview control.
col The column number.
returns "SUCCESS" or "FAILED".

DataViewSetColumnComboBox(shapeName,col,data)
Change a dataview column control to be ComboBoxes with selectable values.
This should be set before data is added, after the dataview is created.
If the dataview is bound to a database, then set this after LDDataBase.EditTable is set.
The values to get and set for the cells are the labels set with the data parameter.

shapeName The dataview control.
col The column number.
data An array of data selections for the combo boxes.
returns "SUCCESS" or "FAILED".

DataViewSetFocus(shapeName,row,col)
Set the focus to a dataview cell.
shapeName The dataview control.
row The row number.
col The column number.
returns "SUCCESS" or "FAILED".

DataViewSetRow(shapeName,row,values)
Add a row of data to a dataview control.
shapeName The dataview control.
row The row number.
If the row number is larger than the current number of rows a new row is added, otherwise the row data is over-written.

values An array of values (one for each column).
returns "SUCCESS" or "FAILED".

DataViewSetValue(shapeName,row,col,value)
Set a dataview cell value.
shapeName The dataview control.
row The row number.
col The column number.
value The value to set.
returns "SUCCESS" or "FAILED".

DocumentViewerLoadXPS(shapeName,fileName)
Load an XPS file to a document viewer dialog control.
shapeName The document viewer control.
fileName The XPS file to load and view.

FileDropped
Event when a file is dropped on an object set with AllowDrop.

LastBrowser
The last browser where a page was loaded.

LastBrowserPage
The last browser page loaded (the url).

LastCheckBox
The last checkbox that was clicked.

LastCheckBoxState
The last checkbox checked state ("True" or "False").

LastComboBox
The last combobox where a selection changed.

LastComboBoxIndex
The last combobox selection changed index (row number).

LastContextControl
The contol or shape of the last right click context menu item selected.

LastContextItem
The index of the last shape or control right click context menu item selected.

LastDataBaseTable
The last database table for which a dataview selection changed.

LastDataView
The last dataview where a selection changed.

LastDataViewButtonClicked
Get the cell row, column and value of the last dataview button clicked.
This is a 3 element array.


LastDataViewCellValueChanged
Get the cell row, column and value of a dataview cell whose value has changed.
This is a 3 element array.


LastDropFiles
An array with the last file(s) that were dropped.

LastDropShape
The last object a file was dropped on.

LastListBox
The last listbox where a selection changed.

LastListBoxIndex
The last listbox selection changed index (row number).

LastListView
The last listview where a selection changed.

LastListViewColumn
The last listview selected column number.

LastListViewRow
The last listview selected row number.

LastMediaPlayer
The last media player for which an event occurred.

LastMenuControl
The last menu control selected.

LastMenuItem
The last menu item selected.

LastPassword
The last password entered.

LastPasswordBox
The password box for which an event occurred.

LastRadioButton
The last radio button that was selected.

LastRadioButtonGroup
The group name for the last radio button selected.

LastRichTextBox
The rich text box for which an event occurred.

LastSlider
The last slider for which an event occurred.

LastSliderValue
The last slider value.

LastTreeView
The last treeview where a selection changed.

LastTreeViewIndex
The last treeview selection changed index (row number).

ListBoxContent(shapeName,list)
Replace a listbox list.
shapeName The listbox shape name.
list An array containing the listbox data.

The first index is the row or node number and the value of the array is the display text at the current node.

list[1] = "Option 1"
list[2] = "Option 2"
list[3] = "Option 3"
list[4] = "Option 4"

Alternatively, this can be a LDArray or LDList.


ListBoxGetSelected(shapeName)
Get a listbox selected node.
shapeName The listbox to get node.
returns The listbox selected node number.
If the selection mode is not single (see ListBoxSelectionMode) then an array of nodes is returned.
The return is "" for no selected nodes.


ListBoxItemChanged
Event when a listbox selection changes or selected item is clicked.

ListBoxSelect(shapeName,node)
Select a node or nodes in a listbox.
shapeName The listbox shape name.
node The node number to select.
This can be an array of nodes if the selection mode is not single (see ListBoxSelectionMode).


ListBoxSelectionMode(shapeName,mode)
Set the selection mode for listbox control.
shapeName The listbox control name.
mode One of the following:
"Single" - single selection (default).
"Multiple" - multiple selections using control key.
"Extended" - extended selections using control and shift keys.


ListViewClear(shapeName)
Remove all rows from a listview control.
shapeName The listview control.

ListViewColAlignment(shapeName,col,alignment)
Set the alignment for a listview column.
shapeName The listview control.
col The column number (indexed from 1).
alignment "Left", "Center" or "Right"

ListViewDeleteRow(shapeName,row)
Delete a row of data from a listview control.
shapeName The listview control.
row The row number (indexed from 1).
If the row number is larger than the current number of rows then no action is taken.


ListViewEdit(shapeName,editable)
Change a listview to editable status.
shapeName The listview shape name.
editable "True" with editable TextBoxes or "False" uneditable TextBlocks.

ListViewGetRow(shapeName,row)
Get a row of data from a listview control.
shapeName The listview control.
row The row number (indexed from 1).
returns An array of values (one for each column) or "" on failure.

ListViewRowCount(shapeName)
Get the number of rows in a listview control.
shapeName The listview control.
returns The number of rows in the listview.

ListViewSelectionChanged
Event when a listview selection changes.

ListViewSetRow(shapeName,row,values)
Add a row of data to a listview control.
shapeName The listview control.
row The row number (indexed from 1).
If the row number is larger than the current number of rows a new row is added, otherwise the row data is over-written.

values An array of values (one for each column).

MediaPlayerEnded
Event when a media player ends playing current media.

MediaPlayerLoad(shapeName,media)
Set the media for a media player.
shapeName The media player name.
media The media to load, e.g. an image, music or video file, jp, mp3, mpg, avi, wmv etc.

MediaPlayerOpened
Event when a media player opens new media.

MediaPlayerPause(shapeName)
Pause a media player playback (using current loaded media).
shapeName The media player name.

MediaPlayerPlay(shapeName)
Start a media player playback (using current loaded media).
shapeName The media player name.

MediaPlayerPlayTime(shapeName)
Get a media play time (using current loaded media).
shapeName The media player name.
returns The media play time in ms.

MediaPlayerPosition(shapeName)
Get a media current position (using current loaded media).
shapeName The media player name.
returns The media current position in ms.

MediaPlayerSeek(shapeName,seek)
Position a media player position (using current loaded media).
shapeName The media player name.
seek The new play position in ms.

MediaPlayerSpeed(shapeName,speed)
Set the playback speed for a media player.
shapeName The media player name.
speed The speed (0 to 100) default 1 (normal playback).

MediaPlayerStop(shapeName)
Stop a media player playback (using current loaded media).
shapeName The media player name.

MediaPlayerStretch(shapeName,stretch)
Set a visual media stretch - how the visual fills its area.
shapeName The media player name.
stretch The stretch method. Available stretch options are:
"None" (The content preserves its original size).
"Uniform" (The content is resized to fit in the destination dimensions while it preserves its native aspect ratio - Default).
"Fill" (The content is resized to fill the destination dimensions. The aspect ratio is not preserved).
"UniformToFill" (The content is resized to fill the destination dimensions while it preserves its native aspect ratio, clipping as required).


MediaPlayerVolume(shapeName,volume)
Set the volume for a media player.
shapeName The media player name.
volume The volume (0 to 1) default 0.5.

MenuBackground(shapeName,colour)
Set the background colour for sub menus.
The main top menu can be coloured separately with LDShapes.BrushColour.
Note that separators are not coloured and it is often best to just colour the top menu.

shapeName The menu shape name.
colour The background colour.

MenuChecked(shapeName,itemName)
Get the check state of a menu item.
shapeName The menu shape name.
itemName The menu item name.
returns "True" or "False".

MenuClicked
Event when a menu item is selected.

PasswordEntered
Event when a password is entered (Return key pressed).

ProgressBarValue(shapeName,value)
Set progress bar value (progress).
shapeName The progress bar shape name.
value The progress value (0 to 100).

RadioButtonClicked
Event when a radio button selection changes (it is clicked).

RadioButtonGet(shapeName)
Get a radio button state.
shapeName The radio button to get state.
returns The radio button state.

RadioButtonSet(shapeName)
Set a radio button to selected.
shapeName The radio button to set.

RichTextBoxCaseSensitive
Whether word or phrase highlighting is case sensitive "True" or "False" (default).
Set this before RichTextBoxWord is called.


RichTextBoxClear(shapeName)
Clear all text from the RichTextBox.
shapeName The RichTextBox control.
returns None.

RichTextBoxDefault(shapeName)
Set a default font style using the current RichTextBox Properties.
Note RichTextBoxFontDecoration not available for this option.

shapeName The RichTextBox control.
returns None.

RichTextBoxFontBackground
The font background colour.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontBold
The font bold style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontFamily
The font family e.g. "Century Gothic".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontForeground
The font foreground colour.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontItalic
The font italic style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontSize
The font point size.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxFontUnderline
The font underline style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.


RichTextBoxGetText(shapeName)
Get text (unformatted) in a RichTextBox.
shapeName The RichTextBox control.
returns The text.

RichTextBoxIndentToTab
Convert first character indents to tabs "True" (default) or "False".
A tab typed as a first character on a line in a RichTextBox creates an indent unless this is set to "True".


RichTextBoxLoad(shapeName,fileName,append)
Load text and formatting from a file in rtf format to a RichTextBox.
shapeName The RichTextBox control.
fileName File to load the text and formatting from.
append Append to existing text "True" or "False".
returns None.

RichTextBoxMargins(left,right,top,bottom)
Set margins (in pixels) for RichTextBox paragraphs.
A new paragraph is created for each text appended (or created) using RichTextBoxSetText.

left Left margin (default 0).
right Right margin (default 0).
top Top margin (default 0).
bottom Bottom margin (default 0).

RichTextBoxReadOnly
The read only state for the RichTextBox "True" or "False.
Set this before AddRichTextBox is called.


RichTextBoxSave(shapeName,fileName)
Save RichTextBox text and formatting to a file in rtf format.
shapeName The RichTextBox control.
fileName File to save the text and formatting to.
returns None.

RichTextBoxSelection(shapeName)
Set a font style of selected RichTextBox text using the current RichTextBox Properties.
shapeName The RichTextBox control.
returns None.

RichTextBoxSetText(shapeName,text,append)
Set text (unformatted) in a RichTextBox.
shapeName The RichTextBox control.
text Text to load.
append Append to existing text "True" or "False".
A new paragraph is created if text is appended. See RichTextBoxMargins to set margins for the paragraph.

returns None.

RichTextBoxTextAlignment
The text alignment "Center" "Left" "Right" or "Justify".
Set this before AddRichTextBox is called.


RichTextBoxTextTyped
Event when text is typed into a rich text box.

RichTextBoxWord(shapeName,text,mode)
Set a font style of a word or phrase using the current RichTextBox Properties.
shapeName The RichTextBox control.
text The text to change (Case sensitive set by RichTextBoxCaseSensitive parameter).
mode Contol over which instances of the word or phrase to set.
0 - All instances
1 - First instance
2 - Last instance

returns None.

SetButtonStyle(shapeName,brushUnpressed,brushMouseOver,brushPressed,penUnpressed,penMouseOver,penPressed,radius,shine)
Modify the style of a button.
shapeName The button to modify.
brushUnpressed The colour of the unpressed button, may be a gradient brush.
brushMouseOver The colour of the button when the mouse is over it, may be a gradient brush.
brushPressed The colour of the pressed button, may be a gradient brush.
penUnpressed The text font colour of the unpressed button.
penMouseOver The text font colour of the button when the mouse is over it.
penPressed The text font colour of the pressed button.
radius The button corner radius (default 9).
shine Apply a 'shine' effect, "True" (default) or "False".
returns "SUCCESS" or "FAILED".

SetCursorPosition(shapeName,position)
Set the cursor caret to specified position within a textbox.
shapeName The textbox shape name.
position The cursor character position (0 is before first character or a large value e.g. 1000 will set the cursor to the end).

SetCursorToEnd(shapeName)
Scroll the cursor caret to the end of a textbox or richtextbox.
This is for multi-line textboxes or richtextboxes.

shapeName The textbox shape name.

SetSpellCheck(shapeName,state)
Set the spell checking for a textbox or richtextbox.
shapeName The textbox or richtextbox shape name.
state "True" or "False"

SliderChanged
Event when a slider is changed.

SliderGetValue(shapeName)
Get slider value (position).
shapeName The slider shape name.
returns The slider value (0 to 100).

SliderMaximum
The maximum slider value, default is 100, the minimum is always 0.
Set this before calling AddSlider.


SliderValue(shapeName,value)
Set slider value (position).
shapeName The slider shape name.
value The slider value (0 to 100).

TextBoxReadOnly(shapeName,readOnly)
Set a textbox readonly state.
shapeName The textbox control.
readOnly "True" or "False" (default).

TextBoxTab(shapeName,acceptsTab)
Set whether a TextBox accepts a tab or uses it to locate the next control.
shapeName The TextBox or RichTextBox name.
acceptsTab "True" or "False" (default).

TreeViewContent(shapeName,tree)
Replace a treeview tree.
shapeName The treeview shape name.
tree A 2D array containing the treeview data.

The first index is the row or node number and the second index is the parent node of the current node (0 for top level).
The value of the array is the display text at the current node.

tree[1][0] = "Level 1"
tree[2][1] = "Level 1 1"
tree[3][1] = "Level 1 2"
tree[4][0] = "Level 2"


TreeViewEdit(shapeName,node,editable)
Change a treeview node editable status.
shapeName The treeview shape name.
node The node to select.
editable "True" an editable TextBox or "False" uneditable.

TreeViewExpand(shapeName,node,expand,recursive)
Expand/collapse nodes in a treeview below input node.
shapeName The treeview shape name.
node Node number to expand/collapse, 0 recusively expands/collapses all nodes.
expand Expand or collapse "True" or "False"
recursive Recursively expand/collapse nodes (all children nodes) "True" or "False"

TreeViewGetData(shapeName)
Get the data from a treeview tree.
shapeName The treeview shape name.
returns A 2D array containing the treeview data.

The first index is the row or node number and the second index is the parent node of the current node (0 for top level).
The value of the array is the display text at the current node.

tree[1][0] = "Level 1"
tree[2][1] = "Level 1 1"
tree[3][1] = "Level 1 2"
tree[4][0] = "Level 2"


TreeViewGetSelected(shapeName)
Get a treeview selected node.
shapeName The treeview to get node.
returns The treeview selected node.

TreeViewItemChanged
Event when a treeview selection changes or selected item is clicked.

TreeViewSelect(shapeName,node)
Select a node in a treeview.
shapeName The treeview shape name.
node The node to select.