pf.Button

pf.Button

Button


Properties

AutoEvaluateText

BackColor

Border

BorderRadius

BoxShadow

ClassName

ColorHovered

Comments

Content

CssClear

Cursor

DetailContainer

DetailDataItem

Enabled

EnabledFormula

ExtraStyle

Float

FontBold

FontFamily

FontItalics

FontSize

ForeColor

Height

IgnoreControlDependencies

Image

ImageDisabled

ImageExtraStyle

ImageHeight

ImageHovered

ImageHtml

ImageSpan

ImageWidth

ManualDependencies

ManualEnabledState

ManualVisibleState

Margin

MaxHeight

MaxWidth

Metadata

MetadataText

MinHeight

MinWidth

Name

Opacity

Overlay

OverlayOpacity

Padding

Parent

ParentExtraStyle

ParentHorizontalAlignment

ParentVerticalAlignment

PrintExtraStyle

Printable

RunTimeControl

Serializable

Size

Tag

TextAlign

Tooltip

TooltipConfiguration

UID

VerticalAlignment

VisibilityFormula

Visible

Width

AddGlobalCssClass

Methods

AddClass

AddClassName

AddManualDependency

AfterRunTimeControlCreated

CanConvertTo

ClearAsReadonly

Clone

ConvertTo

Destroy

GetActualHeight

GetActualWidth

GetAllChildrenControls

GetAsyncLoadedControls

GetBackColor

GetBorder

GetBorderRadius

GetBoxShadow

GetChild

GetChildren

GetClassName

GetColorHovered

GetControl

GetControlAsync

GetControlById

GetControlByTargetFieldName

GetControlByTargetFieldNameAsync

GetControlsById

GetCssClear

GetCursor

GetDependencies

GetExtraStyle

GetFloat

GetFontBold

GetFontFamily

GetFontItalic

GetFontSize

GetForeColor

GetHeight

GetImage

GetImageDisabled

GetImageExtraStyle

GetImageHeight

GetImageHovered

GetImageWidth

GetMargin

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetOffsetTop

GetOpacity

GetOverlay

GetOverlayOpacity

GetPadding

GetParentActualHeight

GetParentActualWidth

GetParentControl

GetParentForm

GetParentFormOrSelf

GetPrintExtraStyle

GetRootControl

GetRootForm

GetTextAlign

GetTooltip

GetTooltipConfiguration

GetVerticalAlignment

GetVisible

GetWidth

HasChild

HasClass

IsEnabled

IsLoaded

IsVisible

RemoveClass

RemoveClassName

ScrollIntoView

SetAsReadonly

SetBackColor

SetBorder

SetBorderRadius

SetBoxShadow

SetChildrenDesignMode

SetClassName

SetColorHovered

SetContent

SetCssClear

SetCursor

SetEnabled

SetEnabledRecursive

SetExtraStyle

SetFloat

SetFontBold

SetFontFamily

SetFontItalics

SetFontSize

SetForeColor

SetHeight

SetImage

SetImageDisabled

SetImageExtraStyle

SetImageHeight

SetImageHovered

SetImageWidth

SetLoaded

SetMargin

SetMaxHeight

SetMaxWidth

SetMetadataText

SetMinHeight

SetMinWidth

SetOpacity

SetOverlay

SetOverlayOpacity

SetPadding

SetPrintExtraStyle

SetTextAlign

SetTooltip

SetTooltipConfiguration

SetVerticalAlignment

SetVisible

SetWidth

ShouldAddGlobalCssClass

SupportsUserEdit

SwitchClass

ToJsCode

ToNormalMode

ToNormalModePrintable

ToPrintMode

ToPrintModePrintable

ToViewMode

ToggleClass

WaitForAsyncControlsToLoad

WithImage

WithImageDisabled

WithImageHeight

WithImageWidth

WithOnClick

WithOnDblClick

toJSON

CreatePropertiesFromHtmlAttributes

FromJSON

FromJSON2

WithText

Events

OnClick

OnControlAdded

OnDblClick

OnLoaded

Properties


AutoEvaluateText

: boolean

Inherited from BaseControl.AutoEvaluateText



BackColor

: string

Sets the background color for the control
Used during control initialization

Inherited from BaseControl.BackColor

Example
var c = new pf.TextBox({BackColor: "gray"});


Border

: string

Sets the border for the control
Used during control initialization

Inherited from BaseControl.Border

Example
var c = new pf.Label({Border: "1px solid #aaa"});


BorderRadius

: string

Sets the border radius for the control
Used during control initialization

Inherited from BaseControl.BorderRadius

Example
var c = new pf.TextBox({BorderRadius: "3px"});


BoxShadow

: string

Defines the css box-shadow for the control
Used during control initialization

Inherited from BaseControl.BoxShadow

Example
var c = new pf.TextBox({BoxShadow: "inset 0px 1px 0px #fff"});


ClassName

: string

Sets the css class name for the control
Used during control initialization

Inherited from BaseControl.ClassName

Example
var c = new pf.TextBox({ClassName: "navbar"});


ColorHovered

: string



Comments

: string

Inherited from BaseControl.Comments



Content

: Content



CssClear

: string

Defines the css clear for the control
Used during control initialization

Inherited from BaseControl.CssClear

Example
var c = new pf.TextBox({CssClear: "both"});


Cursor

: string

Sets the cursor for the control
Used during control initialization
Corresponds to the css cursor object, so available values are all css values (crosshair, default, grab, pointer, text, etc)

Inherited from BaseControl.Cursor

Example
var c = new pf.TextBox({Cursor: "pointer"});


DetailContainer

: any

This property holds the control that contains the parent form of the control
in cases that the form is created dynamically.
For example, when a listbox control generates each row, a new form is created for each row of the listbox.
Each control holds a reference of the parent listbox in the "DetailContainer" property.
This enables the control to perform actions using data outside of its form environment.

Inherited from BaseControl.DetailContainer

Example
 
// Access the value of a control in the root form
// the OnClick event of a button inside a listbox row
var parentListbox = args.Sender.DetailContainer;
var rootForm = parentListbox.GetParentForm();
var value = rootForm.GetControl("Date").GetValue();


DetailDataItem

: any

This property holds a reference to the object from a listbox datasource used to create the current row.
It is available in all controls inside a listbox row

Inherited from BaseControl.DetailDataItem



Enabled

: boolean
= true

Sets if the control is enabled or not
Used during control initialization

Inherited from BaseControl.Enabled

Example
var c = new pf.TextBox({Enabled: false});


EnabledFormula

: string

Defines a javascript formula that will define when the control is enabled
The formula is automatically re-evaluated each time a control that is referenced in the formula changes its value

Inherited from BaseControl.EnabledFormula

Example
var formula = "form.GetControl(\"activeCheckbox\").GetValue()";
var c = new pf.Button({EnabledFormula: formula});
Example
// Formula
form.GetControl("checkbox").GetValue() && form.GetControl("Name") != ""


ExtraStyle

: string

Sets any extra css styles to the control
Used during control initialization

Inherited from BaseControl.ExtraStyle

Example
var c = new pf.Label({ExtraStyle: "margin-left:20px;background-color:#ccc"});


Float

: string

Defines the css float for the control
Used during control initialization

Inherited from BaseControl.Float

Example
var c = new pf.TextBox({Float: "right"});


FontBold

: boolean
= false

Sets if the control font is bold
Used during control initialization

Inherited from BaseControl.FontBold

Example
var c = new pf.Label({FontBold: true});


FontFamily

: string

Sets the font family for the control
Used during control initialization

Inherited from BaseControl.FontFamily

Example
var c = new pf.Label({FontFamily: "Arial"});


FontItalics

: boolean
= false

Sets if the control font style is italic
Used during control initialization

Inherited from BaseControl.FontItalics

Example
var c = new pf.Label({FontItalics: true});


FontSize

: string

Sets the font-size for the control
Used during control initialization

Inherited from BaseControl.FontSize

Example
var c = new pf.Label({FontSize: "20px"});


ForeColor

: string

Sets the foreground color for the control
Used during control initialization

Inherited from BaseControl.ForeColor

Example
var c = new pf.TextBox({ForeColor: "blue"});


Height

: string

Sets the height for the control
Used during control initialization.

Inherited from BaseControl.Height

Example
var c = new pf.ListBox({Height: "150px"});


IgnoreControlDependencies

: string

Inherited from BaseControl.IgnoreControlDependencies



Image

: string



ImageDisabled

: string



ImageExtraStyle

: string



ImageHeight

: string



ImageHovered

: string



ImageHtml

: string



ImageSpan

: HTMLImageElement



ImageWidth

: string



ManualDependencies

: any

Inherited from BaseControl.ManualDependencies



ManualEnabledState

: boolean

Inherited from BaseControl.ManualEnabledState



ManualVisibleState

: boolean

Inherited from BaseControl.ManualVisibleState



Margin

: string

Sets the css margin for the control
Used during control initialization

Inherited from BaseControl.Margin

Example
var c = new pf.Label({Margin: "10px"});


MaxHeight

: string

Sets the maximum height for the control
Used during control initialization

Inherited from BaseControl.MaxHeight

Example
var c = new pf.ListBox({MaxHeight: "300px"});


MaxWidth

: string

Sets the maximum width for the control
Used during control initialization

Inherited from BaseControl.MaxWidth

Example
var c = new pf.TextBox({MaxWidth: "200px"});


Metadata

: string

Inherited from BaseControl.Metadata



MetadataText

: string

Inherited from BaseControl.MetadataText



MinHeight

: string

Sets the minimum height for the control
Used during control initialization

Inherited from BaseControl.MinHeight

Example
var c = new pf.Button({MinHeight: "20px"});


MinWidth

: string

Sets the minimum width for the control
Used during control initialization

Inherited from BaseControl.MinWidth

Example
var c = new pf.Button({MinWidth: "40px"});


Name

: string

The name of the control

Inherited from BaseControl.Name



Opacity

: string

Sets the opacity for the control
Used during control initialization

Inherited from BaseControl.Opacity

Example
var c = new pf.Label({Text: "My Label", Opacity: "0.4"});


Overlay

: boolean

Inherited from BaseControl.Overlay



OverlayOpacity

: string

Inherited from BaseControl.OverlayOpacity



Padding

: string

Sets the padding for the control
Used during control initialization

Inherited from BaseControl.Padding

Example
var c = new pf.Label({HtmlElement: "div", Padding: "10px"});


Parent

: IControl

Inherited from BaseControl.Parent



ParentExtraStyle

: string

Inherited from BaseControl.ParentExtraStyle



ParentHorizontalAlignment

: string

Inherited from BaseControl.ParentHorizontalAlignment



ParentVerticalAlignment

: string

Inherited from BaseControl.ParentVerticalAlignment



PrintExtraStyle

: string

Inherited from BaseControl.PrintExtraStyle



Printable

: boolean

Inherited from BaseControl.Printable



RunTimeControl

: HTMLButtonElement



Serializable

: boolean
= true

Indicates if the control should be serialized in the designer
For controls that are created dynamically during runtime, the user may set this property to true to avoid them being serialized

Inherited from BaseControl.Serializable



Size

: ButtonSizes



Tag

: any

An object that can be used as a placeholder of dynamic properties a user may set to a control during runtime

Inherited from BaseControl.Tag



TextAlign

: string

Defines the css text alignment for the control
Used during control initialization

Inherited from BaseControl.TextAlign

Example
var c = new pf.TextBox({TextAlign: "center"});


Tooltip

: string

Sets the tooltip for the control

Inherited from BaseControl.Tooltip

Example
var c = new pf.TextBox({Tooltip: "The address of the customer"});


TooltipConfiguration

: ITooltipOptions

Inherited from BaseControl.TooltipConfiguration



UID

: string
= A new GUID is generated for each control

A unique identifier for the control
Used during control initialization

Inherited from BaseControl.UID



VerticalAlignment

: string

Inherited from BaseControl.VerticalAlignment



VisibilityFormula

: string

Defines a javascript formula that will define when the control is visible
The formula is automatically re-evaluated each time a control that is referenced in the formula changes its value

Inherited from BaseControl.VisibilityFormula

Example
var formula = "form.GetControl(\"activeCheckbox\").GetValue()";
var c = new pf.Button({VisibilityFormula: formula});
Example
// Formula
form.GetControl("checkbox").GetValue() && form.GetControl("Name") != ""


Visible

: boolean
= true

Sets if the control is visible or not
Used during control initialization

Inherited from BaseControl.Visible

Example
var c = new pf.TextBox({Visible: false});


Width

: string

Sets the width of the control
Used during control initialization

Inherited from BaseControl.Width

Example
var c = new pf.TextBox({Width: "100px"});


AddGlobalCssClass

: boolean


Methods


AddClass

(className: string[])
: void
Inherited from BaseControl.AddClass




AddClassName

(cls: string)
: void
Adds a css class to a control

Inherited from BaseControl.AddClassName

Example
form.GetControl("Title").AddClassName("active");



AddManualDependency

(name: string, dep: IControlDependency)
: void
Inherited from BaseControl.AddManualDependency




AfterRunTimeControlCreated

()
: void



CanConvertTo

(toControlType: string)
: boolean



ClearAsReadonly

(exceptions: string[])
: void
Inherited from BaseControl.ClearAsReadonly




Clone

()
: BaseControl
Inherited from BaseControl.Clone




ConvertTo

(toControlType: string)
: IControl



Destroy

()
: void



GetActualHeight

()
: number
Inherited from BaseControl.GetActualHeight




GetActualWidth

()
: number
Inherited from BaseControl.GetActualWidth




GetAllChildrenControls

()
:
Returns all children controls for this control

Inherited from BaseControl.GetAllChildrenControls

Example
var children = c.GetAllChildrenControls();



GetAsyncLoadedControls

()
:
Inherited from BaseControl.GetAsyncLoadedControls




GetBackColor

()
: string
Inherited from BaseControl.GetBackColor




GetBorder

()
: string
Inherited from BaseControl.GetBorder




GetBorderRadius

()
: string
Inherited from BaseControl.GetBorderRadius




GetBoxShadow

()
: string
Inherited from BaseControl.GetBoxShadow




GetChild

(name: string)
: IControl
Returns the first child control (direct child) that has a specific name
Search is case sensitive

Inherited from BaseControl.GetChild

Example
var control = container.GetChild("TitleTextBox");



GetChildren

()
:



GetClassName

()
: string
Inherited from BaseControl.GetClassName




GetColorHovered

()
: string
Returns the image used when mouse is over the button




GetControl

(name: string)
: IControl
Returns the first child control (recursively) that has a specific name
Search is case sensitive

Inherited from BaseControl.GetControl

Example
var control = container.GetControl("TitleTextBox");



GetControlAsync

(name: string, callback: , maxTime: number)
: void
Searches for a child control asynchronously in cases that child controls are loaded at a later stage.
This could happen when dynamic loading Template controls.
Default time is 3000 (ms)

Inherited from BaseControl.GetControlAsync

Example
form.GetControlAsync("clientId", function(control) {
if (control) control.SetEnabled(false);
}, 2000);



GetControlById

(id: string)
: IControl
Returns the first child control (recursively) that has a specific UID

Inherited from BaseControl.GetControlById

Example
var control = container.GetControlById("ID1");



GetControlByTargetFieldName

(name: string)
: IDataControl
Returns a control by its TargetFieldName property

Inherited from BaseControl.GetControlByTargetFieldName

Example
var c = form.GetControlByTargetFieldName("CustomerType");



GetControlByTargetFieldNameAsync

(name: string, callback: , maxTime: number)
: void
Inherited from BaseControl.GetControlByTargetFieldNameAsync




GetControlsById

(uid: string)
:
Returns child controls (recursively) that have a specific UID

Inherited from BaseControl.GetControlsById

Example
var controls = container.GetControlsById("ID1");



GetCssClear

()
: string
Inherited from BaseControl.GetCssClear




GetCursor

()
: string
Inherited from BaseControl.GetCursor




GetDependencies

(name: string)
: IControlDependency
Inherited from BaseControl.GetDependencies




GetExtraStyle

()
: string
Inherited from BaseControl.GetExtraStyle




GetFloat

()
: string
Inherited from BaseControl.GetFloat




GetFontBold

()
: boolean
Inherited from BaseControl.GetFontBold




GetFontFamily

()
: string
Inherited from BaseControl.GetFontFamily




GetFontItalic

()
: boolean
Inherited from BaseControl.GetFontItalic




GetFontSize

()
: string
Inherited from BaseControl.GetFontSize




GetForeColor

()
: string
Inherited from BaseControl.GetForeColor




GetHeight

()
: string
Returns the height of the control

Inherited from BaseControl.GetHeight




GetImage

()
: string
Returns the image source of the image button




GetImageDisabled

()
: string



GetImageExtraStyle

()
: string



GetImageHeight

()
: string
Returns the inner image height




GetImageHovered

()
: string
Returns the image used when the mouse is over the button

Example
var img = form.GetControl("button1").GetImageHovered();



GetImageWidth

()
: string
Returns the inner image width




GetMargin

()
: string
Returns the css margin of the control

Inherited from BaseControl.GetMargin




GetMaxHeight

()
: string
Inherited from BaseControl.GetMaxHeight




GetMaxWidth

()
: string
Inherited from BaseControl.GetMaxWidth




GetMinHeight

()
: string
Inherited from BaseControl.GetMinHeight




GetMinWidth

()
: string
Inherited from BaseControl.GetMinWidth




GetOffsetTop

()
: number
Inherited from BaseControl.GetOffsetTop




GetOpacity

()
: string
Inherited from BaseControl.GetOpacity




GetOverlay

()
: boolean
Inherited from BaseControl.GetOverlay




GetOverlayOpacity

()
: string
Inherited from BaseControl.GetOverlayOpacity




GetPadding

()
: string
Returns the css padding of the control

Inherited from BaseControl.GetPadding




GetParentActualHeight

()
: number
Inherited from BaseControl.GetParentActualHeight




GetParentActualWidth

()
: number
Inherited from BaseControl.GetParentActualWidth




GetParentControl

(name: string)
: IControl
Inherited from BaseControl.GetParentControl




GetParentForm

()
: Form
Returns the parent form object

Inherited from BaseControl.GetParentForm

Example
var parent = c.GetParentForm();



GetParentFormOrSelf

()
: Form
Returns the parent form object or self if the referenced control is a Form object

Inherited from BaseControl.GetParentFormOrSelf

Example
var parent = c.GetParentFormOrSelf();



GetPrintExtraStyle

()
: string
Inherited from BaseControl.GetPrintExtraStyle




GetRootControl

()
: any
Returns the root Html element for this control

Inherited from BaseControl.GetRootControl




GetRootForm

()
: Form
Inherited from BaseControl.GetRootForm




GetTextAlign

()
: string
Inherited from BaseControl.GetTextAlign




GetTooltip

()
: string
Inherited from BaseControl.GetTooltip




GetTooltipConfiguration

()
: ITooltipOptions
Inherited from BaseControl.GetTooltipConfiguration




GetVerticalAlignment

()
: string
Inherited from BaseControl.GetVerticalAlignment




GetVisible

()
: boolean
Inherited from BaseControl.GetVisible




GetWidth

()
: string
Inherited from BaseControl.GetWidth




HasChild

(c: BaseControl)
: boolean
Inherited from BaseControl.HasChild




HasClass

(className: string)
: boolean
Returns true if the control has a specific class

Inherited from BaseControl.HasClass




IsEnabled

()
: boolean
Inherited from BaseControl.IsEnabled




IsLoaded

()
: boolean
Inherited from BaseControl.IsLoaded




IsVisible

()
: boolean
Inherited from BaseControl.IsVisible




RemoveClass

(className: string[])
: void
Inherited from BaseControl.RemoveClass




RemoveClassName

(cls: string)
: void
Removes a css class from a control

Inherited from BaseControl.RemoveClassName

Example
form.GetControl("Title").RemoveClassName("active");



ScrollIntoView

()
: void
Inherited from BaseControl.ScrollIntoView




SetAsReadonly

(exceptions: string[])
: void
Disables all children controls

Inherited from BaseControl.SetAsReadonly




SetBackColor

(color: string)
: void
Sets the background color for the control

Inherited from BaseControl.SetBackColor

Example
form.GetControl("Name").SetBackColor("blue");



SetBorder

(border: string)
: void
Sets the css border for the control

Inherited from BaseControl.SetBorder

Example
form.GetControl("Name").SetBorder("1px solid #aaa");



SetBorderRadius

(radius: string)
: void
Sets the css border radius for the control

Inherited from BaseControl.SetBorderRadius

Example
form.GetControl("Name").SetBorderRadius("3px");



SetBoxShadow

(value: string)
: void
Sets the css box dhadow for the control

Inherited from BaseControl.SetBoxShadow

Example
form.GetControl("Name").SetBoxShadow("inset 0px 1px 0px #fff");



SetChildrenDesignMode

(design: boolean, designer: IDesigner)
: void



SetClassName

(cls: string)
: void
Sets the css class for a control

Inherited from BaseControl.SetClassName

Example
form.GetControl("Title").SetClassName("active");



SetColorHovered

(value: string)
: void
Sets the color used when the mouse is over the button
When the hovered color is set, the button starts monitoring mouse-enter and mouse-leave events
Relative method: SetImageHovered

Example
form.GetControl("button1").SetColorHovered("orange");



SetContent

(content: any)
: any



SetCssClear

(clear: string)
: void
Sets the css clear for the control

Inherited from BaseControl.SetCssClear

Example
form.GetControl("Name").SetCssClear("both");



SetCursor

(cursor: string)
: void
Sets the css cursor for the control

Inherited from BaseControl.SetCursor

Example
form.GetControl("Name").SetCursor("pointer");



SetEnabled

(enable: boolean)
: void



SetEnabledRecursive

(enabled: any, exceptions: string[])
: void
Inherited from BaseControl.SetEnabledRecursive




SetExtraStyle

(style: string)
: void
Sets extra css styles to the control

Inherited from BaseControl.SetExtraStyle

Example
form.GetControl("Name").SetExtraStyle("margin-top:10px;clear:both;");



SetFloat

(cssFloat: string)
: void
Sets the css float for the control

Inherited from BaseControl.SetFloat

Example
form.GetControl("Name").SetFloat("right");



SetFontBold

(bold: boolean)
: void
Sets the font-bold property for the control

Inherited from BaseControl.SetFontBold

Example
form.GetControl("Name").SetFontBold(true);



SetFontFamily

(family: string)
: void
Sets the font family for the control

Inherited from BaseControl.SetFontFamily

Example
form.GetControl("Name").SetFontFamily("Arial");



SetFontItalics

(italics: boolean)
: void
Sets the font style for the control

Inherited from BaseControl.SetFontItalics

Example
form.GetControl("Name").SetFontItalics(true);



SetFontSize

(size: string)
: void
Sets the font size for the control

Inherited from BaseControl.SetFontSize

Example
form.GetControl("Name").SetFontSize("14px");



SetForeColor

(color: string)
: void
Sets the foreground color for the control

Inherited from BaseControl.SetForeColor

Example
form.GetControl("Name").SetForeColor("#c00");



SetHeight

(height: string)
: void
Sets the height of the control

Inherited from BaseControl.SetHeight

Example
form.GetControl("Name").SetHeight("20px");



SetImage

(imageSrc: string)
: void
Sets the source of the inner image

Example
form.GetControl("button1").SetImage("/images/pin.png");



SetImageDisabled

(imageSrc: string)
: void
Sets the image used when the button is disabled

Example
form.GetControl("button1").SetImageDisabled("/images/save.png");



SetImageExtraStyle

(style: string)
: void
Sets extra css styles to the image

Example
form.GetControl("button1").SetImageExtraStyle("float:right;border:1px solid black");



SetImageHeight

(height: string)
: void
Sets the inner image height

Example
form.GetControl("button1").SetImageHeight("32px");



SetImageHovered

(imageSrc: string)
: void
Sets the image used when the mouse is over the button
When the hovered image is set, the button starts monitoring mouse-enter and mouse-leave events
Relative method: SetColorHovered

Example
form.GetControl("button1").SetImageHovered("/images/save.png");



SetImageWidth

(width: string)
: void
Sets the inner image width

Example
form.GetControl("button1").SetImageWidth("32px");



SetLoaded

()
: void
Inherited from BaseControl.SetLoaded




SetMargin

(margin: string)
: void
Sets the css margin for the control

Inherited from BaseControl.SetMargin

Example
form.GetControl("Name").SetMargin("10px 20px");
Example
form.GetControl("Name").SetMargin("10px");
Example
form.GetControl("Name").SetMargin("10px 20px 30px 40px");



SetMaxHeight

(height: string)
: void
Sets the maximum height for the control

Inherited from BaseControl.SetMaxHeight

Example
form.GetControl("Name").SetMaxHeight("200px");



SetMaxWidth

(width: string)
: void
Sets the maximum width for the control

Inherited from BaseControl.SetMaxWidth

Example
form.GetControl("Name").SetMaxWidth("200px");



SetMetadataText

(metadataText: string)
: void
Inherited from BaseControl.SetMetadataText




SetMinHeight

(height: string)
: void
Sets the minimum height for the control

Inherited from BaseControl.SetMinHeight

Example
form.GetControl("Name").SetMinHeight("200px");



SetMinWidth

(width: string)
: void
Sets the minimum width for the control

Inherited from BaseControl.SetMinWidth

Example
form.GetControl("Name").SetMinWidth("50px");



SetOpacity

(op: string)
: void
Sets the opacity for the control

Inherited from BaseControl.SetOpacity

Example
form.GetControl("Name").SetOpacity("0.6");



SetOverlay

(set: boolean)
: void
Inherited from BaseControl.SetOverlay




SetOverlayOpacity

(opacity: string)
: void
Inherited from BaseControl.SetOverlayOpacity




SetPadding

(padding: string)
: void
Sets the css padding for the control

Inherited from BaseControl.SetPadding

Example
form.GetControl("Name").SetPadding("10px 20px");
Example
form.GetControl("Name").SetPadding("10px");
Example
form.GetControl("Name").SetPadding("10px 20px 30px 40px");



SetPrintExtraStyle

(style: string)
: void
Inherited from BaseControl.SetPrintExtraStyle




SetTextAlign

(align: string)
: void
Sets the css text alignment for the control

Inherited from BaseControl.SetTextAlign

Example
form.GetControl("Name").SetTextAlign("center");



SetTooltip

(tooltip: string, options: any)
: void
Sets a tooltip for the control

Inherited from BaseControl.SetTooltip

Example
form.GetControl("Address").SetTooltip("This is the address field");



SetTooltipConfiguration

(value: ITooltipOptions)
: void
Inherited from BaseControl.SetTooltipConfiguration




SetVerticalAlignment

(align: string)
: void
Inherited from BaseControl.SetVerticalAlignment




SetVisible

(visible: boolean)
: void
Hides or shows a control

Inherited from BaseControl.SetVisible

Example
form.GetControl("Title").SetVisible(false);



SetWidth

(width: string)
: void
Sets the width for the control

Inherited from BaseControl.SetWidth

Example
form.GetControl("Name").SetWidth("100%");



ShouldAddGlobalCssClass

()
: boolean



SupportsUserEdit

()
: boolean



SwitchClass

(condition: boolean, classNames: string[])
: void
Inherited from BaseControl.SwitchClass




ToJsCode

(options: IJsCodeGenerationOptions)
: IControlJsCode



ToNormalMode

()
: void
Inherited from BaseControl.ToNormalMode




ToNormalModePrintable

()
: boolean
Inherited from BaseControl.ToNormalModePrintable




ToPrintMode

()
: void
Inherited from BaseControl.ToPrintMode




ToPrintModePrintable

()
: boolean
Inherited from BaseControl.ToPrintModePrintable




ToViewMode

()
: void
Inherited from BaseControl.ToViewMode




ToggleClass

(classNames: string[])
: void
Inherited from BaseControl.ToggleClass




WaitForAsyncControlsToLoad

(callback: any)
: void
Inherited from BaseControl.WaitForAsyncControlsToLoad




WithImage

(imageSrc: string)
: this
Sets the image source (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageDisabled("/images/save2.png");



WithImageDisabled

(imageSrc: string)
: this
Sets the disabled image source (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageDisabled("/images/save2.png");



WithImageHeight

(imageHeight: string)
: this
Sets the image height (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageHeight("32px");



WithImageWidth

(imageWidth: string)
: this
Sets the image width (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageWidth("32px");



WithOnClick

(h: )
: this
Sets the Click handler (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageWidth("32px").WithOnClick(function(e) {alert("Button Clicked")});



WithOnDblClick

(h: )
: this
Sets the DoubleClick handler (for method chaining)

Example
form.GetControl("button").WithImage("/images/save.png").WithImageWidth("32px").WithOnDblClick(function(e) {alert("Button Double Clicked")});



toJSON

()
: any



CreatePropertiesFromHtmlAttributes

(c: BaseControl, el: HTMLElement)
: any
Inherited from BaseControl.CreatePropertiesFromHtmlAttributes




FromJSON

(def: any)
: Button



FromJSON2

(r: Button, def: any)
: Button



WithText

(text: string)
: Button


Events


OnClick

(form: pf.Form, args: IControlEventArgs (Event: any, Parent: any, Sender: any))
:



OnControlAdded

(form: pf.Form, args: IControlAddedEventArgs (Control: any, Parent: any, Sender: any))
:
Inherited from BaseControl.OnControlAdded




OnDblClick

(form: pf.Form, args: IControlEventArgs (Event: any, Parent: any, Sender: any))
:



OnLoaded

(form: pf.Form, args: IEventArgs (Parent: any, Sender: any))
:
Inherited from BaseControl.OnLoaded