Class ProgrammeToolbar : addButton Method
void addButton( String image, Function callback, String tip, Integer orderNumber, Boolean enabled, Boolean pushed ) |
Summary
Add a button to the programme toolbar.
Parameters
Parameter | Description |
String image |
Image used for this button |
Function callback |
Function that gets called when the user pushes the button. |
String tip |
Tooltip used for this button |
Integer orderNumber |
A sort number that allows the button to be positioned just where you'd like it. |
Boolean enabled |
Whether the button is enabled or disabled. |
Boolean pushed |
Whether the button is pushed or not. |
|
|
|
Examples
function my_onInPlaceDescriptionToolBarEvent( prog, toolbar ) { toolbar.addButton( "%DGIMAGEDIR%Markers.dgimglib:marker-watch-delete.png", my_onButtonEvent, "<b>Click my button</b><br>Click the button for " + prog.name, 100000, true, true ); }
function my_onButtonEvent( programme ) { debugOut( "Button for " + programme.name + " has been clicked" ); return true; // Update the toolbar }
app.addEventHandler( "onInPlaceDescriptionToolbar", StandardWatch_onInPlaceDescriptionToolBarEvent );
|
Requirements
1115
|