Button

Button is the primary interactive component used in the Pexeso framework. You can assign event handler to it's click (px\controls\MouseEvent::CLICK) event and provide necessary logic to be invoked upon button's click.

Button's property label contain's text displayed within the button. Additionally it is possible to set icon property to image URL to be displayed as button's icon.

syntax
elementnamespacename
Buttonhttp://pexeso-php.sourceforge.net/1.0Button

Component Tester

component examplecomponent properties
disabled:yes
label:
icon:
accessKey:
component styles
width:
height:
fontSize:

Example


Example source code

Source code of the exmaple above.

<?xml version="1.0" encoding="UTF-8"?>
<px:Component xmlns:h="http://www.w3.org/1999/xhtml"
	xmlns:px="http://pexeso-php.sourceforge.net/1.0"
	xmlns:ex="examples">
	<px:Form>
		<px:Button label="Button 1"
			click="{$self->message->value=$target->label.' clicked'}"/>
		<px:Button label="Button 2"
			click="{$self->message->value=$target->label.' clicked'}"/>
		<px:Button label="Button 3"
			click="{$self->message->value=$target->label.' clicked'}"/>
		<h:br/>
		<px:Text name="message" value=""/>
	</px:Form>
</px:Component>