Class: SC.PopupButtonView

Extends SC.ButtonView.

SC.PopupButtonView displays a pop-up menu when clicked, from which the user can select an item.

To use, create the SC.PopupButtonView as you would a standard SC.ButtonView, then set the menu property to an instance of SC.MenuPane. For example:{
  layout: { width: 200, height: 18 },
  menuBinding: 'MyApp.menuController.menuPane'

You would then have your MyApp.menuController return an instance of the menu to display.

Defined in: popup_button.js

Field Summary

Fields borrowed from SC.ButtonView:
action, ariaRole, autoResizePadding, buttonBehavior, contentIconKey, contentTitleKey, displayProperties, escapeHTML, icon, isCancel, isDefault, keyEquivalent, localize, needsEllipsis, supportFocusRing, target, themeName, title, toggleOffValue, toggleOnValue, value
Fields borrowed from SC.View:
acceptsMultitouch, ariaHidden, 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, toInvalidate
Fields borrowed from SC.Observable:
Fields borrowed from SC.Control:
controlSize, errorLabel, fieldKey, fieldLabel, isActive, isControl, isSelected

Instance Methods

Field Detail

classNames Array
Default value:
The SC.MenuPane that should be displayed when the button is clicked.
Default value:
menuPreferMatrix Array
The prefer matrix (positioning information) to use to pop up the new menu.
Defined in: popup_button.js.
Default value:
[0, 0, 0]
The prefer matrix to use when displaying the menu.
renderDelegateName String
Default value:
shouldLoadInBackground Boolean

If YES and the menu is a class, this will cause a task that will instantiate the menu to be added to SC.backgroundTaskQueue.

Default value:

Instance Method Detail


Called to instantiate a menu. You can override this to set properties such as the menu's width or the currently selected item.

Defined in: popup_button.js.
menu SC.MenuPane
The MenuPane class to instantiate.
Hides the PopupButton's menu if it is currently showing.
Defined in: popup_button.js.

Instantiates the menu if it exists and is not already instantiated. If another menu is already instantiated, it will be destroyed.

Defined in: popup_button.js.

Shows the PopupButton's menu. You can call this to show it manually.

NOTE: The menu will not be shown until the end of the Run Loop.

Defined in: popup_button.js.
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:21 GMT-0600 (CST)