Event: onDrawGridAddition


Integer onDrawGridAddition( DrawContext dc, Rect rcSpaceToDrawIn, String textColour, Programme programme )

Summary

Called to give scripts an opportunity to draw in the grid.


Remarks

Below is an example of using this event to draw a High Definition icon on the grid:

function onDrawGridAddition_HD( dc, rc, textColour, programme  )
{
if( programme.qualifiers.indexOf( "High Definition" ) != -1 )
{
var image = system.getImage( "%DGIMAGEDIR%fun.dgimglib:hd.png" );
image.draw( 0, dc, rc.left, rc.top );
return image.getSize().cx;
}
return 0;
}

app.addEventHandler( "onDrawGridAddition", onDrawGridAddition_HD )


Parameters

ParameterDescription
DrawContext dc
Rect rcSpaceToDrawIn
String textColour
Programme programme


Returns


The width of the drawn area, or zero if nothing needs to be drawn.


See Also

  • App : addEventHandler


    Requirements

    1119