BiTreeView

This class is the base for BiGrid2 and BiTree2. It can be used directly with a data model.

This class extends BiTreeViewBase and therefore all methods and fields available for BiTreeViewBase are also available for BiTreeView .

Constructor

new BiTreeView ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
scrollLeftExactNumbercheckedThis returns the exact scroll position. scrollLeft on the other hand returns the scroll position where the first visible row starts at
scrollTopExactNumbercheckedThis returns the exact scroll position. scrollTop on the other hand returns the scroll position where the first visible row starts at
showBrokenCellTextAsToolTipBooleancheckedcheckedIf this is property is set to true, tooltip will show whenever a broken cell is hovered. Default value is false.

Methods

NameDescription
getCellInfoReturns a BiTreeViewCellInfo object based on the mouse coordinates
getExpandIconHtmlthis returns the HTML code for the expand icon
getHeaderHtmlCodeThis returns the HTML code for header of the tree view
getHtmlCodeThis returns the HTML code for the body of the tree view
getRowHeaderHtmlCodeThis returns the HTML code for the row headers.
invalidateRowMarks the row as invalid. This will try to redraw only the invalidated rows instead of redrawing the entire viewport (in some cases).
updateCellUpdates (redraws) the given cell
updateContentSizeThis is called when the size of the content has changed. This happens for example when a row is added/removed and when subtrees are collapsed/expanded
updateRowThis redraws a row
updateRowHeaderCellThis updates the row header cell for the given row
updateSizeThis updates the sizes of different parts of the sub controls

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

getCellInfo

Returns a BiTreeViewCellInfo object based on the mouse coordinates

Syntax

object.getCellInfo ( nOffsetX,nOffsetY )

Parameters

NameTypeOptionalDefaultDescripton
nOffsetXNumberThe left postion relative to the tree view
nOffsetYNumberThe top postion relative to the tree view

Return Type

BiTreeViewCellInfo

getExpandIconHtml

this returns the HTML code for the expand icon

Syntax

object.getExpandIconHtml ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberthe column index
yNumberthe row index

Return Type

String

getHeaderHtmlCode

This returns the HTML code for header of the tree view

Syntax

object.getHeaderHtmlCode ( nScrollLeft,nWidth )

Parameters

NameTypeOptionalDefaultDescripton
nScrollLeftNumberThe distance from the left to start painting at
nWidthNumberThe width of the viewport

Return Type

String

getHtmlCode

This returns the HTML code for the body of the tree view

Syntax

object.getHtmlCode ( nScrollLeft,nScrollTop,nWidth,nHeight )

Parameters

NameTypeOptionalDefaultDescripton
nScrollLeftNumberThe distance from the left to start painting at
nScrollTopNumberThe distance from the top to start painting at
nWidthNumberThe width of the viewport
nHeightNumberThe height of the viewport

Return Type

String

getRowHeaderHtmlCode

This returns the HTML code for the row headers.

Syntax

object.getRowHeaderHtmlCode ( nScrollTop,nHeight )

Parameters

NameTypeOptionalDefaultDescripton
nScrollTopNumberThe distance from the top to start painting at
nHeightNumberThe height of the viewport

Return Type

String

invalidateRow

Marks the row as invalid. This will try to redraw only the invalidated rows instead of redrawing the entire viewport (in some cases).

Syntax

object.invalidateRow ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe index of the row to invalidate

Return Type

void

updateCell

Updates (redraws) the given cell

Syntax

object.updateCell ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe column of the cell
yNumberThe row of the cell

Return Type

void

updateContentSize

This is called when the size of the content has changed. This happens for example when a row is added/removed and when subtrees are collapsed/expanded

Syntax

object.updateContentSize ( )

Parameters

No arguments.

Return Type

void

updateRow

This redraws a row

Syntax

object.updateRow ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe row index for the row to update

Return Type

void

updateRowHeaderCell

This updates the row header cell for the given row

Syntax

object.updateRowHeaderCell ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe index of the row header to update

Return Type

void

updateSize

This updates the sizes of different parts of the sub controls

Syntax

object.updateSize ( )

Parameters

No arguments.

Return Type

void