Class ColumnManager : addColumn Method


void addColumn( Column column, Integer columnType )

Summary

Add a column.


Remarks

Adds a column. If column ID already exists then it is replaced with new column.


Parameters

ParameterDescription
Column column The new column you wish to add
Integer columnType Type of column you wish to add. Currently only columns of type knColumnTypeProgrammes and knColumnTypeMultiAlert can be added.


Examples

var c = new Column( "Channel Name", 1, 25, 50, true, true, "Full channel name" )

c.onDraw = function ( dc, rc, textColour, programme )
{
dc.drawEllipsisText( rc.left, rc.top, rc.right, programme.channel.name, textColour );
}

c.onGetWidth = function( dc, programme )
{
return dc.measureText( programme.channel.name ).cx;
}

c.onCompareItems = function( programmeLeft, programmeRight )
{
if( programmeLeft.channel.name > programmeRight.channel.name )
{
return 1;
}
else if( programmeLeft.channel.name < programmeRight.channel.name )
{
return -1;
}
return 0;
}

cm.addColumn( knColumnTypeProgrammes, c );


See Also

  • Column


    Requirements

    1065