# tinymce.ui.Button

Namespace | tinymce.ui
Class | Button
Inheritance | Button Control
Subclasses | SplitButton

This class is used to create a UI button. A button is basically a link that is styled to look like a button or icon.

## Public Methods

Method | Defined By
--- | ---
Button(id:String, s:Object, ed:Editor) Constructs a new button control instance. | Button
destroy():void Destroys the control will free any memory by removing event listeners etc. | Control
isActive():Boolean Returns true/false if the control is disabled or not. | Control
isDisabled():Boolean Returns true/false if the control is disabled or not. | Control
isRendered():Boolean Returns true/false if the control has been rendered or not. | Control
postRender():void Post render handler. | Button
remove():void Removes the control. | Control
renderHTML():String Renders the button as a HTML string. | Button
renderTo(n:Element):void Renders the control to the specified container element. | Control
setActive(s:Boolean):void Sets the activated state for the control. | Control
setDisabled(s:Boolean):void Sets the disabled state for the control. | Control
setState(c:String, s:Boolean):void Sets the specified class state for the control. | Control

## Method details

### Buttonconstructor

`public function Button(id:String, s:Object, ed:Editor)`
Constructs a new button control instance.

#### Parameters

id:String | Control id for the button.
s:Object | Optional name/value settings object.
ed:Editor | Optional the editor instance this button is for.

### postRendermethod

`public function postRender():void`
Post render handler. This function will be called after the UI has been rendered so that events can be added.

### renderHTMLmethod

`public function renderHTML():String`
Renders the button as a HTML string. This method is much faster than using the DOM and when creating a whole toolbar with buttons it does make a lot of difference.

#### Returns

String - HTML for the button control element.