To set text for KoolButton, you do:
$my_linkbutton->Text = "Go to google";
You can set the left image, right image or both:
$my_linkbutton->LeftImage = "path/to/leftimage.png";
$my_linkbutton->RightImage = "path/to/rightimage.png";
You can apply css to the left image and right image by creating your own css and assign to LeftImageCss and RighrImageCss:
$my_linkbutton->LeftImageCss = "my_left_image_css";
$my_linkbutton->RightImageCss = "my_right_image_css";
To add link to link button, you do:
$my_linkbutton->Link="http://www.google.com";
To assign the target window, you do:
$my_linkbutton->Target="_blank";//Open new window
You also can assign function to be executed when clicking button:
$my_linkbutton->OnClick="my_function";
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"//Button with Left Image
"btnOK_left_image""OK"'javascript:alert("OK clicked")'"/KoolForm/icons/plain/check2.png""btnCancel_left_image""Cancel"'javascript:alert("Cancel clicked")'"/KoolForm/icons/plain/delete2.png""btnViewInvoice_left_image""View Invoice"'javascript:alert("View Invoice clicked")'"/KoolForm/icons/plain/text.png""btnRate_left_image""Rate"'javascript:alert("Rate clicked")'"/KoolForm/icons/plain/star_yellow.png""btnTools_left_image""Tools"'javascript:alert("Tools clicked")'"/KoolForm/icons/plain/gear.png""btnCut_left_image""Cut"'javascript:alert("Cut clicked")'"/KoolForm/icons/plain/cut.png""btnCopy_left_image""Copy"'javascript:alert("Copy clicked")'"/KoolForm/icons/plain/copy.png""btnPaste_left_image""Paste"'javascript:alert("Paste clicked")'"/KoolForm/icons/plain/paste.png"//Button with Right Image
"btnOK_right_image""OK"'javascript:alert("OK clicked")'"/KoolForm/icons/plain/check2.png""btnCancel_right_image""Cancel"'javascript:alert("Cancel clicked")'"/KoolForm/icons/plain/delete2.png""btnViewInvoice_right_image""View Invoice"'javascript:alert("View Invoice clicked")'"/KoolForm/icons/plain/text.png""btnRate_right_image""Rate"'javascript:alert("Rate clicked")'"/KoolForm/icons/plain/star_yellow.png""btnTools_right_image""Tools"'javascript:alert("Tools clicked")'"/KoolForm/icons/plain/gear.png""btnCut_right_image""Cut"'javascript:alert("Cut clicked")'"/KoolForm/icons/plain/cut.png""btnCopy_right_image""Copy"'javascript:alert("Copy clicked")'"/KoolForm/icons/plain/copy.png""btnPaste_right_image""Paste"'javascript:alert("Paste clicked")'"/KoolForm/icons/plain/paste.png""btnGoToGoogle_right_image""Go to google"'http://www.google.com''_blank'"/KoolForm/icons/plain/view.png""/KoolForm/icons/plain/arrow_right_green.png"//Init form
"myform" method="post""decoration">
<style type="text/css"#CCCCCC;
#CCCCCC;
#CCCCCC;
#FAFAFA;
#FDFEE3;
"table_of_buttons""alt""alt""alt""alt""2" align="center"