Help Menu

KaioneSoft Home

Help Home

Index

Glossary

Conventions

Introduction

Installation

Getting Started

SprintDB Pro 2

Desktop Companion

Using Tables

Creating SQL

Creating Forms

How to

Advanced Techniques

Database Functions

SprintDB Control Properties

BackColor

Set/Get the background color of the control.

Example

Dim(bcolor)

SetVar(@bcolor,&control1.BackColor)

SetControl(&control2.BackColor, @bcolor)

SetControl(&control3.BackColor, RGB(255,0,0) )

 

Border

Set/Get the Border property of the control.

1 - display the control with border, 0 - without border

Example

SetControl(&control1.Border, 1 )

MsgBox(&control1.Border)

 

Column()

Returns the text of the specified column in a list control.

Note: available for list control only

Example

Dim(fcol)

SetVar(@fcol,&listcontrol1.FocusColumn )

MsgBox(&listcontrol1.Column(@fcol))

 

ComboBoundColumn

Set/Get the index of the bound column of the control.

Note: available for combo box control only. Index starts with 1(the fist column).

Example

MsgBox(&combo1.ComboBoundColumn)

...

SetControl(&combo1.ComboColumnCount, 2 )

SetControl(&combo1.ComboBoundColumn, 1 )

SetControl(&combo1.ComboVisibleColumn, 2 )

SetComboSoure(&combo1, "SELECT tbl1.ID, tbl1.Txt FROM tbl1")

 

ComboColumnCount

Set/Get the number of columns in the control.

Note: available for combo box control only

Example

MsgBox(&combo1.ComboColumnCount)

...

SetControl(&combo1.ComboColumnCount, 2 )

SetControl(&combo1.ComboBoundColumn, 1 )

SetControl(&combo1.ComboVisibleColumn, 2 )

SetComboSoure(&combo1, "SELECT tbl1.ID, tbl1.Txt FROM tbl1")


ComboVisibleColumn

Set/Get the index of the visible column of the control.

Note: available for combo box control only. Index starts with 1(the fist column).

Example

MsgBox(&combo1.ComboVisibleColumn)

...

SetControl(&combo1.ComboColumnCount, 2 )

SetControl(&combo1.ComboBoundColumn, 1 )

SetControl(&combo1.ComboVisibleColumn, 2 )

SetComboSoure(&combo1, "SELECT tbl1.ID, tbl1.Txt FROM tbl1")

 

ControlSource

Set the control source of the control.

Example

SetControl(&control1.ControlSource, "RECNO()+'/'+RECCOUNT()")

SetControl(&control2.ControlSource, &tbleName+".txtField1")

SetControl(&control3.ControlSource, "table1.field1")

 

FocusColumn

Returns the currently selected column in a list control.

Note: available for list control only

Example

Dim(fcol)

SetVar(@fcol,&listcontrol1.FocusColumn )

MsgBox(&listcontrol1.Column(@fcol))


FocusTab

Set/Get the currently selected tab page in a list control.

Tab page starts with 1(the first tab page).

Note: available for tab control only

Example

SetControl(&tab1.FocusTab, 2 )

MsgBox(&tab1.FocusTab)

 

FontBold

Set/Get the FontBold property of the control.

1 - bold font, 0 - normal font.

Example

SetControl(&control1.FontBold, 1 )

MsgBox(&control1.FontBold)

 

FontItalic

Set/Get the FontItalic property of the control.

1 - italic font, 0 - normal font.

Example

SetControl(&control1.FontItalic, 1 )

MsgBox(&control1.FontItalic)


FontName

Set/Get the font name of the control.

Example

SetControl(&control1.FontName, "Tahoma" )

MsgBox(&control1.FontName)


FontSize

Set/Get the font size of the control.

Example

SetControl(&control1.FontSize, 9 )

MsgBox(&control1.FontSize)

 

FontStrikeOut

Set/Get the FontStrikeOut property of the control.

1 - strikeout font, 0 - normal font.

Example

SetControl(&control1.FontStrikeOut, 1 )

MsgBox(&control1.FontStrikeOut)


FontUnderline

Set/Get the FontUnderline property of the control.

1 - underline font, 0 - normal font.

Example

SetControl(&control1.FontUnderline, 1 )

MsgBox(&control1.FontUnderline)


ForeColor

Set/Get the text color of the control.

Example

SetControl(&control1.ForeColor, RGB(255,255,0) )

 

Form

Set/Get the Form property of the control.

Form starts with 0. (0 - MainForm, 1 - SubForm1, 2 - SubForm2, ...)

Example

SetControl(&control1.Form, 1 )

SetControl(&control1.ControlSource, "table2.field1" )

 

Left/Top/Height/Width

Set/Get the position of the left/top side, height and width of the control in pixel.

Example

SetControl(&control1.Left, 50 )

MsgBox(&control1.Left)

 

Locked

Set/Get the Locked property of the control.

1 - read-only, 0 - editable

Example

SetControl(&control1.Locked, 1 )

MsgBox(&control1.Locked)

 

Stretch

Set the Stretch property of the control.

One of the following values:

"Stretch" - Stretch the picture to fill the control.

"Zoom" - Enlarges the picture, but does not disort the picture in either horizontrol or vertical direction.

"No"

Note: available for picture box control only

Example

SetControl(&picturecontrol1.Stretch, "Stretch" )
SetControl(&picturecontrol1.Stretch, "Zoom" )
SetControl(&picturecontrol1.Stretch, "No" )


TabStop

Set/Get the TabStop property of the control.

1 - tab stop. You can give the focus to the control using TAB key.

0 - no tab stop. 

Example

SetControl(&control1.TabStop, 0 )

MsgBox(&control1.TabStop)


Visible

Set/Get the Visible property of the control.

1 - visible, 0 - hidden

Example

SetControl(&control1.Visible, 1 )

MsgBox(&control1.Visible)


ItemID()

Returns the specified item's id of the tree control.

Note: available for tree control only.
Syntax
ItemID(tid,relation)

Arguments
Tid: a tree item id.
If you omit the Tid and the relation arguments, ItemID() will return the id of the currently selected item.
Relation: specify the type of relation to specified Tid item. This can be one of the following values:


"next" -the next sibling item.
"previous" - the previous sibling item.
"parent" - the parent of the specified item.
"child" - the first child item.

Example

//Retrieve the currently selected item's id and save it to @Tid.
Dim(Tid)
SetVar(@Tid,&tree1.ItemID())

//Retrieve the parent id of the currently selected item and store it to @parentTid.
Dim(parentTid)

SetVar(@parentTid,&tree1.ItemID(@Tid,"parent") )

//Display the item text of the parent item.
MsgBox(&tree1.ItemText(@parentTid) )

 

ItemIDEx()

Returns the specified item's item id that was set by using TreeInsertItemEx() or TreeSetItemIDEx() macro actions.

Note: available for tree control only.
Syntax
ItemIDEx(IID,relation)

Arguments
IID
: Specify an item id.
If you omit IID and the relation arguments, ItemIDEx() will return the IID of the currently selected item.
Relation: specify the type of relation to specified IID item. This can be one of the following values:

"next" -the next sibling item.
"previous" - the previous sibling item.
"parent" - the parent of the specified item.
"child" - the first child item.

Example

//Retrieve the currently selected item's id and save it to @iid.
Dim(iid)
SetVar(@iid,&tree1.ItemIDEx())

//Retrieve the parent id of the currently selected item and store it to @parentIid.
Dim(parentIid)

SetVar(@parentIid,&tree1.ItemIDEx(@iid,"parent") )

//Display the item text of the parent item.
MsgBox(&tree1.ItemTextEx(@parentIid) )


RootItemID()

Returns the root item id of the tree control.

Note: available for tree control only.
Syntax
RoottemID()

Example

//Retrieve the root item's id store it to @Tid.
Dim(Tid)
SetVar(@Tid,&tree1.RootItemID())

//Insert a child item.
TreeInsertItem(&tree1, @Tid, "Item1");

 

RootItemIDEx()

Returns the root item's IID set by using TreeInsertItemEx() or TreeSetItemIDEx() macro actions.

Note: available for tree control only.
Syntax
RoottemIDEx()

Example

//Retrieve the root item's id store it to @Tid.
Dim(iid)
SetVar(@iid,&tree1.RootItemIDEx())

TreeSetItemEx(&tree1, @iid, "Item1");

TreeInsertItemEx(&tree1, @iid, @iid+100, "Item1-1");


ItemText()

Returns the specified item's text.

Note: available for tree control only.
Syntax
ItemText(tid)

Arguments
Tid: a tree item id. If you omit the Tid argument, ItemText() will return the currently selected item's text.

Example

//Retrieve the currently selected item's id and store it to @Tid.
Dim(Tid)
SetVar(@Tid,&tree1.ItemID())

//Retrieve the parent id of the currently selected item and store it to @parentTid.
Dim(parentTid)

SetVar(@parentTid,&tree1.ItemID(@Tid,"parent") )
MsgBox(&tree1.ItemText(@parentTid) )

 

ItemTextEx()

Returns the specified item's text.

Note: available for tree control only.
Syntax
ItemTextEx(iid)

Arguments
IID: an item id. If you omit the IID argument, ItemTextEx() will return the currently selected item's text. IID should be the item ID set by using TreeInsertItemEx() or TreeSetItemIDEx().

Example

//Retrieve the currently selected item's id and save it to @iid.
Dim(iid)
SetVar(@iid,&tree1.ItemIDEx())

//Retrieve the parent id of the currently selected item and store it to @parentIid.
Dim(parentIid)

SetVar(@parentIid,&tree1.ItemIDEx(@iid,"parent") )

//Display the item text of the parent item.
MsgBox(&tree1.ItemTextEx(@parentIid) )