To add option to KoolToggleButton you do:
$play_stop->AddOption(array( "Text"=>"Play",
"Value"=>"Play",
"LeftImage"=>"/path/to/leftimage.png")
"RightImage"=>"/path/to/rightimage.png")
"LeftImageCss"=>"leftimage_css")
"RightImageCss"=>"rightimage_css")
"ButtonCss"=>"button_css")
"ToolTip"=>"This is the button")
);
When button is clicked, you can capture the click event with:
$play_stop->OnClick="do_something";
span style="color: #808080; font-style: italic;">/*
* This file is ready to run as standalone example. However, please do:
* 1. Add tags <html><head><body> to make a complete page
* 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder
*/
$KoolControlsFolder = "../../../../KoolControls";//Relative path to "KoolPHPSuite/KoolControls" folder
"/KoolForm/koolform.php""myform""/KoolForm""office2010silver""play_stop");
/*Below are the full API of AddOption method.
*
$play_stop->AddOption(array( "Text"=>"Play",
"Value"=>"Play",
"LeftImage"=>"/path/to/leftimage.png")
"RightImage"=>"/path/to/rightimage.png")
"LeftImageCss"=>"leftimage_css")
"RightImageCss"=>"rightimage_css")
"ButtonCss"=>"button_css")
"ToolTip"=>"This is the button")
);
*/"Text"=>"Play",
"Value"=>"Play",
"LeftImage"=> $KoolControlsFolder."/KoolForm/icons/plain/media_play_green.png",
"ToolTip"=>"Play radio""Text"=>"Stop",
"Value"=>"Stop",
"LeftImage"=> $KoolControlsFolder."/KoolForm/icons/plain/media_stop_red.png",
"ToolTip"=>"Stop radio""60px""play_stop_click""rewind""RR""/KoolForm/icons/plain/media_rewind.png""Rewind""fast_forward""FF""/KoolForm/icons/plain/media_fast_forward.png""Fast foward"//Init form
"myform" method="post""decoration">
<fieldset style="width:190px;padding-bottom:10px;padding-left:10px;""text/javascript""Stop""status").innerHTML = "Playing..""status").innerHTML = "Stop""margin-top:10px;""status"