LitDev Extension API
LDControls
![](images/IntellisenseObject.png)
Controls for the GraphicsWindow.
AddBrowser(width,height,url)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Add a checkbox dialog control.
title The title of the control.
returns The checkbox shape name.
AddComboBox(list,width,height)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Get an array of the browser history (pages loaded).
shapeName The browser name.
returns The array of urls in the history.
BrowserNavigate(shapeName,direction)
![](images/IntellisenseMethod.png)
Move browser page forward or backwards.
shapeName The browser name.
direction "F" or "B" for forwards or backwards.
BrowserPageLoaded
![](images/IntellisenseEvent.png)
Event when a browser page is loaded.
BrowserSetURL(shapeName,url)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
Event when a checkbox is clicked.
CheckBoxGetState(shapeName)
![](images/IntellisenseMethod.png)
Get a checkbox checked state.
shapeName The checkbox to get state.
returns The checkbox checked state.
CheckBoxState(shapeName,state)
![](images/IntellisenseMethod.png)
Set a checkbox checked state.
shapeName The checkbox shape name.
state The checkbox check state ("True" or "False").
ComboBoxContent(shapeName,list)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Get a combobox selected node.
shapeName The combobox to get node.
returns The combobox selected node.
ComboBoxItemChanged
![](images/IntellisenseEvent.png)
Event when a combobox selection changes or selected item is clicked.
ComboBoxSelect(shapeName,node)
![](images/IntellisenseMethod.png)
Select a node in a combobox.
shapeName The combobox shape name.
node The node to select.
ContextMenuClicked
![](images/IntellisenseEvent.png)
Event when a shape or control right click context menu item is selected.
DataViewAllowSort(shapeName,allow)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
Event when a dataview button is clicked.
DataViewCellValueChanged
![](images/IntellisenseEvent.png)
Event when a dataview cell value changes after it is commited, for example by selecting away from the cell.
DataViewClear(shapeName)
![](images/IntellisenseMethod.png)
Clear all rows in a dataview.
shapeName The dataview control.
returns "SUCCESS" or "FAILED".
DataViewColAlignment(shapeName,col,alignment)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Delete a row from a dataview control.
shapeName The dataview control.
row The row number.
returns "SUCCESS" or "FAILED".
DataViewFont(shapeName,location,fontFamily,fontSize,fontItallic,fontBold,foreColour,backColour)
![](images/IntellisenseMethod.png)
Set a font for dataview. Set this immediately after the dataview is created.
shapeName The dataview control.
location Loaction for font "rows", "header" or "" for both.
fontFamily The font family name (default "").
fontSize The font size (default "").
fontItallic The font is itallic ("True" or "False").
fontBold The font is bold ("True" or "False").
foreColour The font colour (default "").
backColour The background colour (default "").
DataViewGetFocus(shapeName)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Load an XPS file to a document viewer dialog control.
shapeName The document viewer control.
fileName The XPS file to load and view.
FileDropped
![](images/IntellisenseEvent.png)
Event when a file is dropped on an object set with AllowDrop.
LastBrowser
![](images/IntellisenseProperty.png)
The last browser where a page was loaded.
LastBrowserPage
![](images/IntellisenseProperty.png)
The last browser page loaded (the url).
LastCheckBox
![](images/IntellisenseProperty.png)
The last checkbox that was clicked.
LastCheckBoxState
![](images/IntellisenseProperty.png)
The last checkbox checked state ("True" or "False").
LastComboBox
![](images/IntellisenseProperty.png)
The last combobox where a selection changed.
LastComboBoxIndex
![](images/IntellisenseProperty.png)
The last combobox selection changed index (row number).
LastContextControl
![](images/IntellisenseProperty.png)
The contol or shape of the last right click context menu item selected.
LastContextItem
![](images/IntellisenseProperty.png)
The index of the last shape or control right click context menu item selected.
LastDataBaseTable
![](images/IntellisenseProperty.png)
The last database table for which a dataview selection changed.
LastDataView
![](images/IntellisenseProperty.png)
The last dataview where a selection changed.
LastDataViewButtonClicked
![](images/IntellisenseProperty.png)
Get the cell row, column and value of the last dataview button clicked.
This is a 3 element array.
LastDataViewCellValueChanged
![](images/IntellisenseProperty.png)
Get the cell row, column and value of a dataview cell whose value has changed.
This is a 3 element array.
LastDropFiles
![](images/IntellisenseProperty.png)
An array with the last file(s) that were dropped.
LastDropShape
![](images/IntellisenseProperty.png)
The last object a file was dropped on.
LastListBox
![](images/IntellisenseProperty.png)
The last listbox where a selection changed.
LastListBoxIndex
![](images/IntellisenseProperty.png)
The last listbox selection changed index (row number).
LastListView
![](images/IntellisenseProperty.png)
The last listview where a selection changed.
LastListViewColumn
![](images/IntellisenseProperty.png)
The last listview selected column number.
LastListViewRow
![](images/IntellisenseProperty.png)
The last listview selected row number.
LastMediaPlayer
![](images/IntellisenseProperty.png)
The last media player for which an event occurred.
LastMenuControl
![](images/IntellisenseProperty.png)
The last menu control selected.
LastMenuItem
![](images/IntellisenseProperty.png)
The last menu item selected.
LastPassword
![](images/IntellisenseProperty.png)
The last password entered.
LastPasswordBox
![](images/IntellisenseProperty.png)
The password box for which an event occurred.
LastRadioButton
![](images/IntellisenseProperty.png)
The last radio button that was selected.
LastRadioButtonGroup
![](images/IntellisenseProperty.png)
The group name for the last radio button selected.
LastRichTextBox
![](images/IntellisenseProperty.png)
The rich text box for which an event occurred.
LastRichTextBoxSelection
![](images/IntellisenseProperty.png)
The rich text box selected text associated with RichTextBoxSelectionChanged event.
LastSlider
![](images/IntellisenseProperty.png)
The last slider for which an event occurred.
LastSliderValue
![](images/IntellisenseProperty.png)
The last slider value.
LastTreeView
![](images/IntellisenseProperty.png)
The last treeview where a selection changed.
LastTreeViewIndex
![](images/IntellisenseProperty.png)
The last treeview selection changed index (row number).
ListBoxContent(shapeName,list)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
Event when a listbox selection changes or selected item is clicked.
ListBoxSelect(shapeName,node)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Remove all rows from a listview control.
shapeName The listview control.
ListViewColAlignment(shapeName,col,alignment)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Change a listview to editable status.
shapeName The listview shape name.
editable "True" with editable TextBoxes or "False" uneditable TextBlocks.
ListViewGetRow(shapeName,row)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Get the number of rows in a listview control.
shapeName The listview control.
returns The number of rows in the listview.
ListViewSelectionChanged
![](images/IntellisenseEvent.png)
Event when a listview selection changes.
ListViewSetRow(shapeName,row,values)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
Event when a media player ends playing current media.
MediaPlayerLoad(shapeName,media)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseEvent.png)
Event when a media player opens new media.
MediaPlayerPause(shapeName)
![](images/IntellisenseMethod.png)
Pause a media player playback (using current loaded media).
shapeName The media player name.
MediaPlayerPlay(shapeName)
![](images/IntellisenseMethod.png)
Start a media player playback (using current loaded media).
shapeName The media player name.
MediaPlayerPlayTime(shapeName)
![](images/IntellisenseMethod.png)
Get a media play time (using current loaded media).
shapeName The media player name.
returns The media play time in ms.
MediaPlayerPosition(shapeName)
![](images/IntellisenseMethod.png)
Get a media current position (using current loaded media).
shapeName The media player name.
returns The media current position in ms.
MediaPlayerSeek(shapeName,seek)
![](images/IntellisenseMethod.png)
Position a media player position (using current loaded media).
shapeName The media player name.
seek The new play position in ms.
MediaPlayerSpeed(shapeName,speed)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Stop a media player playback (using current loaded media).
shapeName The media player name.
MediaPlayerStretch(shapeName,stretch)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Set the volume for a media player.
shapeName The media player name.
volume The volume (0 to 1) default 0.5.
MenuBackground(shapeName,colour)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Get the check state of a menu item.
shapeName The menu shape name.
itemName The menu item name.
returns "True" or "False".
MenuClicked
![](images/IntellisenseEvent.png)
Event when a menu item is selected.
PasswordEntered
![](images/IntellisenseEvent.png)
Event when a password is entered (Return key pressed).
ProgressBarValue(shapeName,value)
![](images/IntellisenseMethod.png)
Set progress bar value (progress).
shapeName The progress bar shape name.
value The progress value (0 to 100).
RadioButtonClicked
![](images/IntellisenseEvent.png)
Event when a radio button selection changes (it is clicked).
RadioButtonGet(shapeName)
![](images/IntellisenseMethod.png)
Get a radio button state.
shapeName The radio button to get state.
returns The radio button state.
RadioButtonSet(shapeName)
![](images/IntellisenseMethod.png)
Set a radio button to selected.
shapeName The radio button to set.
RichTextBoxCaretCoordinates(shapeName)
![](images/IntellisenseMethod.png)
Get the GraphicsWindow coordinates (center) of cursor caret in a RichTextBox.
shapeName The RichTextBox control.
returns Array with the GraphicsWindow coordinates at the cursor caret position.
RichTextBoxCaretPosition(shapeName)
![](images/IntellisenseMethod.png)
Get the line text and column of text currently at the cursor caret in a RichTextBox.
shapeName The RichTextBox control.
returns Array with the line text and column number at the cursor caret position.
RichTextBoxCaseSensitive
![](images/IntellisenseProperty.png)
Whether word or phrase highlighting is case sensitive "True" or "False" (default).
Set this before RichTextBoxWord is called.
RichTextBoxClear(shapeName)
![](images/IntellisenseMethod.png)
Clear all text from the RichTextBox.
shapeName The RichTextBox control.
returns None.
RichTextBoxDefault(shapeName)
![](images/IntellisenseMethod.png)
Set a default font style using the current RichTextBox Properties.
Note RichTextBoxFontDecoration not available for this option.
shapeName The RichTextBox control.
returns None.
RichTextBoxFontBackground
![](images/IntellisenseProperty.png)
The font background colour.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontBold
![](images/IntellisenseProperty.png)
The font bold style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontFamily
![](images/IntellisenseProperty.png)
The font family e.g. "Century Gothic".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontForeground
![](images/IntellisenseProperty.png)
The font foreground colour.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontItalic
![](images/IntellisenseProperty.png)
The font italic style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontSize
![](images/IntellisenseProperty.png)
The font point size.
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxFontUnderline
![](images/IntellisenseProperty.png)
The font underline style "True" or "False".
Set this before RichTextBoxSelection, RichTextBoxWord or RichTextBoxDefault is called.
RichTextBoxGetText(shapeName)
![](images/IntellisenseMethod.png)
Get text (unformatted) in a RichTextBox.
shapeName The RichTextBox control.
returns The text.
RichTextBoxIndentToTab
![](images/IntellisenseProperty.png)
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".
RichTextBoxInsert(shapeName,text,mode)
![](images/IntellisenseMethod.png)
Insert text into a RichTextBox.
shapeName The RichTextBox control.
text The text to insert.
mode Control over the text insertion.
0 - Insert at the Caret.
RichTextBoxLoad(shapeName,fileName,append)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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).
RichTextBoxMousePosition(shapeName,overText)
![](images/IntellisenseMethod.png)
Get the line text and column of text currently closest to the mouse in a RichTextBox.
shapeName The RichTextBox control.
overText Mouse must be exactly over text "True" or the nearest text "False".
returns Array with the line text and column number closest to mouse position.
RichTextBoxReadOnly
![](images/IntellisenseProperty.png)
The read only state for the RichTextBox "True" or "False.
Set this before AddRichTextBox is called.
RichTextBoxSave(shapeName,fileName)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Set a font style of selected RichTextBox text using the current RichTextBox Properties.
shapeName The RichTextBox control.
returns None.
RichTextBoxSelectionChanged
![](images/IntellisenseEvent.png)
Event when text selection changed a rich text box.
RichTextBoxSetText(shapeName,text,append)
![](images/IntellisenseMethod.png)
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
![](images/IntellisenseProperty.png)
The text alignment "Center" "Left" "Right" or "Justify".
Set this before AddRichTextBox is called.
RichTextBoxTextTyped
![](images/IntellisenseEvent.png)
Event when text is typed into a rich text box.
RichTextBoxWholeWord
![](images/IntellisenseProperty.png)
Whether word or phrase highlighting is for whole word only "True" or "False" (default).
Set this before RichTextBoxWord is called.
RichTextBoxWord(shapeName,text,mode)
![](images/IntellisenseMethod.png)
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
3 - All instances (style the entire line)
returns None.
SetButtonStyle(shapeName,brushUnpressed,brushMouseOver,brushPressed,penUnpressed,penMouseOver,penPressed,radius,shine)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Set the spell checking for a textbox or richtextbox.
shapeName The textbox or richtextbox shape name.
state "True" or "False"
SliderChanged
![](images/IntellisenseEvent.png)
Event when a slider is changed.
SliderGetValue(shapeName)
![](images/IntellisenseMethod.png)
Get slider value (position).
shapeName The slider shape name.
returns The slider value (0 to 100).
SliderMaximum
![](images/IntellisenseProperty.png)
The maximum slider value, default is 100, the minimum is always 0.
Set this before calling AddSlider.
SliderValue(shapeName,value)
![](images/IntellisenseMethod.png)
Set slider value (position).
shapeName The slider shape name.
value The slider value (0 to 100).
TextBoxReadOnly(shapeName,readOnly)
![](images/IntellisenseMethod.png)
Set a textbox readonly state.
shapeName The textbox control.
readOnly "True" or "False" (default).
TextBoxSelection(shapeName)
![](images/IntellisenseMethod.png)
Get selected text in a TextBox.
shapeName The TextBox or RichTextBox name.
returns The selected text.
TextBoxTab(shapeName,acceptsTab)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
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)
![](images/IntellisenseMethod.png)
Get a treeview selected node.
shapeName The treeview to get node.
returns The treeview selected node.
TreeViewItemChanged
![](images/IntellisenseEvent.png)
Event when a treeview selection changes or selected item is clicked.
TreeViewSelect(shapeName,node)
![](images/IntellisenseMethod.png)
Select a node in a treeview.
shapeName The treeview shape name.
node The node to select.