linb.UI.PopMenu

Direct Super Classes

linb.Base

linb.iBox

linb.iDataBinder

linb.UI

linb.UI.iList

linb.UI.iWidget

Events

afterCreated (profile)
Fired after component is created. At this time, component object has not been attached to DOM.
profile: UIProfile. See profile name.

afterRendered (profile)
Fired after component is rendered in DOM. At this time, component object has been attached to DOM.
profile: UIProfile. See profile name.

afterValueSet (profile, oldValue, newValue, showValue)
Fired after value is set. See Sigma Linb component value model.
profile: UIProfile. See profile name.
oldValue: Boolean. Value before setting.
newValue: Boolean. Value after setting.
showValue: Boolean. Presentation value.

afterValueUpdated (profile, oldValue, newValue, showValue)
Fired after value is uppadeted. See Sigma Linb component value model.
profile: UIProfile. See profile name.
oldValue: Boolean. Value before setting.
newValue: Boolean. Value after setting.
showValue: Boolean. Presentation value.

beforeClickEffect (profile, item, src, type)
When end uese is clicking this component, this component will high-light itself. This action is called clicking effect. Developer can change default effect in this event handler. If false returned, default effect will be disabled.
profile: UIProfile. See profile name.
item: Always be null.
src: DOM node. The DOM host of this event.
type: String. Could be "mousedown" or "mouseup".

beforeDestroy (profile)
Fired before component is destroyed.
profile: UIProfile. See profile name.

beforeHoverEffect (profile, item, src, type)
When mouse pointer is hovering over this component, this component will high-light itself. This action is called clicking effect. Developer can change default effect in this event handler. If false returned, default effect will be disabled.
profile: UIProfile. See profile name.
item: Always be null.
src: DOM node. The DOM host of this event.
type: String. Could be "mousedown" or "mouseup".

beforeValueSet (profile, oldValue, newValue, showValue)
Fired before value is set. See Sigma Linb component value model.
profile: UIProfile. See profile name.
oldValue: Boolean. Value before setting.
newValue: Boolean. Value after setting.
showValue: Boolean. Presentation value.

beforeValueUpdated (profile, oldValue, newValue, showValue)
Fired before value is updated. See Sigma Linb component value model.
profile: UIProfile. See profile name.
oldValue: Boolean. Value before setting.
newValue: Boolean. Value after setting.
showValue: Boolean. Presentation value.

onCancelled (profile)
Fired when user presses esc after menu item drops down.
profile: UIProfile. See profile name.

onHide (profile)
Fired when menu item hides.
profile: UIProfile. See profile name.

onHotKeydown (profile, key, control, shift, alt, e, src)
Fired when key is down.
profile: UIProfile. See profile name.
key: String. Example - "a","b","c","enter","tab".
control: Boolean. True for user pressing Ctrl key , false for not.
shift: Boolean. True for user pressing Shift key , false for not.
alt: Boolean. True for user pressing Alt key , false for not.
e: See event object.
src: DOM node. Event host.

onHotKeypress (profile, key, control, shift, alt, e, src)
Fired when key is pressed.
profile: UIProfile. See profile name.
key: String. Example - "a","b","c","enter","tab".
control: Boolean. True for user pressing Ctrl key , false for not.
shift: Boolean. True for user pressing Shift key , false for not.
alt: Boolean. True for user pressing Alt key , false for not.
e: See event object.
src: DOM node. Event host.

onHotKeyup (profile, key, control, shift, alt, e, src)
Fired when key is up.
profile: UIProfile. See profile name.
key: String. Example - "a","b","c","enter","tab".
control: Boolean. True for user pressing Ctrl key , false for not.
shift: Boolean. True for user pressing Shift key , false for not.
alt: Boolean. True for user pressing Alt key , false for not.
e: See event object.
src: DOM node. Event host.

onMenuSelected ( profile, id, src)
Fired when menu item is selected.
profile: UIProfile. See profile name.
id: String. Id of menu item.
src: DOM node. Event host.

Instance Methods

activate ( )
To activate this pop menu.

adjustSize ( )
To adjust menu size.

getMaxHeight ( )
To get maximum height. A scroll button appears when all content can't be showed at one time.
returns: integer. Maximun height.

getMaxWidth ( )
To get maximum width. Menu text will be cut off if it's too long.
return: integer. Maximun width.

getResizable ( )
To determine whether component is resizable or not.
returns: Boolean. True for resizable, false for not.

getShadow ( )
To determine whether shadow is showing or hiding.
returns: Boolean. True for showing , false for hiding.

hide ( flag )
Hide menus poped.

pop ( obj, parent, type )
Pop up menu.
obj:
parent: ui object. Menu parent.
type:

scrollToBottom ( )
To scroll menu to the botton.

scrollToTop ( )
To scroll menu to the top.

setItems(v)
To set pop menu items. Example setItems([{"id":"itema","caption":"itema","tips":"item a"},{"type":"split"}])
v: Array. Item array.

setMaxHeight ( value, flag )
Set maximum height. A scroll button appears when all content can't be showed at one time.
value: integer. Maximun height.

setMaxWidth ( value, flag )
Set maximum width. Menu text will be cut off if it's too long.
value: integer. Maximun width.

setResizable ( value, flag )
To set component resizable or not.
value: Boolean. True for resizable, false for not.

setScrollButtons ( value, flag )
To show or hide scroll buttons. A scroll button appears when all content can't be showed at one time.
value: Boolean. True for showing, false for hiding.

setShadow ( value, flag )
To add or remove shadow.
value: Boolean. True for adding, false for removing.