Class: SC.ImageButtonView


Extends SC.ButtonView, SC.Control, SC.View.

Provides a button that displays an image instead of the standard button user interface.

It behaves the same as an SC.ButtonView, but has an image property that should be set to a unique class name.

For example:

SC.ImageButtonView.create({
  action: 'imageButtonWasClicked',

  image: 'my-image-button-icon'
});

You could then add some CSS rule for a normal state:

$theme.image-button .my-image-button-icon {

Defined in: image_button.js

Since:
SproutCore 1.5

Field Summary

Fields borrowed from SC.View:
acceptsFirstResponder, acceptsMultitouch, ariaHidden, ariaRole, attributeBindings, autoMixins, backgroundColor, childViewLayout, childViewLayoutOptions, childViews, childViewsNeedLayout, classNameBindings, concatenatedProperties, createdByParent, designMode, enabledState, firstKeyView, hasLayout, hasTouch, hasVisibility, isBuildingIn, isBuildingOut, isChildViewLayoutLive, isEnabled, isFixedHeight, isFixedPosition, isFixedSize, isFixedWidth, isKeyResponder, isTextSelectable, isView, isVisible, lastKeyView, layerLocationNeedsUpdate, layerNeedsUpdate, layout, modeAdjust, nextKeyView, page, pane, parentView, previousKeyView, shouldInheritCursor, shouldInheritEnabled, tagName, toolTip, touchBoundary, transitionAdjust, transitionAdjustOptions, transitionHide, transitionHideOptions, transitionIn, transitionInOptions, transitionOut, transitionOutOptions, transitionShow, transitionShowOptions, useStaticLayout
Fields borrowed from SC.Responder:
hasFirstResponder, isFirstResponder, responderContext
Fields borrowed from SC.Object:
isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
Fields borrowed from SC.Observable:
isObservable
Fields borrowed from SC.Control:
controlSize, errorLabel, fieldKey, fieldLabel, isActive, isControl, isSelected
Fields borrowed from SC.ButtonView:
action, autoResizePadding, buttonBehavior, contentIconKey, contentTitleKey, escapeHTML, icon, isCancel, isDefault, keyEquivalent, localize, needsEllipsis, supportFocusRing, title, toggleOffValue, toggleOnValue, value

Field Detail

classNames Array
Default value:
['sc-image-button-view']
See:
SC.View#classNames
displayProperties Array
Default value:
['image']
image String
A class name that will be applied to the img tag of the button.
Default value:
null
renderDelegateName String
Default value:
'imageButtonRenderDelegate'
themeName String

Unlike SC.ButtonView, SC.ImageButtonView does not have a default theme that needs to be applied for backwards compatibility.

Default value:
null
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)