thyDropDownBox

This is the Drop Down Combo Box Element.  It provides a thyGridCell, a thyButton and a thyListBox working together to provide a Drop-Down Combo Box Widget.

CSS Classes

.thyDropDownBoxThe class of main element, derived from thyEditBox
.thyDropDownBox_buttonThe thyButton element class
.thyDropDownBox_listBoxThe thyListBox element class
.<object name>The class of main element, derived from thyEditBox
.<object name>_editThe thyEditBox element class
.<object name>_buttonThe thyButton element class
.<object name>_listBoxThe thyListBox element class

Events

onselectWhen user selects an option
onchangeWhen there’s any change in value (by reset and populate considered)

See Also

Summary
This is the Drop Down Combo Box Element.
Initialization method called before creation
Sets the default value when widget is reset
Returns the index of the selected option
Returns the value of the selected option
Returns the content of the selected option
Returns a thyCollection with the index, the value and the content of the selected option
Returns the associated content with the specified value
Overloaded method that prevents the insertion of children in thyDropDownBox
Overloaded method that prevents the removal of children of thyDropDownBox
Overwritten method that sets the name of main, button and listbox and refreshes CSS Classes
Overloaded method that sets the CSS Class of main, button and listbox
Overloaded method that removes dropList from memory
Removes all rows from dropList and clear dropEdit
Resets dropList to defaultValue
Sets the contents of the thyDropDownBox.
Gets the value that was selected by the user.
Overwritten method that adds the class to main, button and listbox
Overwritten method that removes the specified CSS Class from main, button and listbox
Hides the thyListBox element
Shows the <thyListBox>element
Returns the function that shows the ListBox
Returns the function that shows the ListBox and press the button
Checks on every mousedown event if the event was done out of dropList and in that case, just hide the list

initThyDropDownBox

p.initThyDropDownBox = function ()

Initialization method called before creation

setDefaultValue

p.setDefaultValue = function (value)

Sets the default value when widget is reset

Parameters

valueThe default value

getSelectedIndex

p.getSelectedIndex = function ()

Returns the index of the selected option

getSelectedValue

p.getSelectedValue = function ()

Returns the value of the selected option

getSelectedContent

p.getSelectedContent = function ()

Returns the content of the selected option

getSelected

p.getSelected = function ()

Returns a thyCollection with the index, the value and the content of the selected option

getContentByValue

p.getContentByValue = function (value)

Returns the associated content with the specified value

Parameter

valueThe value associated with the needed content

addChild

p.addChild = function ()

Overloaded method that prevents the insertion of children in thyDropDownBox

removeChild

p.removeChild = function ()

Overloaded method that prevents the removal of children of thyDropDownBox

setName

p.setName = function (name)

Overwritten method that sets the name of main, button and listbox and refreshes CSS Classes

Parameter

nameThe new widget name

setCSSClass

p.setCSSClass = function (type)

Overloaded method that sets the CSS Class of main, button and listbox

Parameter

typeThe CSS type

Private Methods

_destroy

p._destroy = function ()

Overloaded method that removes dropList from memory

_cleanUp

Removes all rows from dropList and clear dropEdit

_reset

p._reset = function ()

Resets dropList to defaultValue

_populateContents

p._populateContents = function (data)

Sets the contents of the thyDropDownBox.  This is the same populate as thyListBox::populate, so pass correct formated data.

Parameter

dataThe thyDropDownBox possible values

_sweepOutContents

p._sweepOutContents = function ()

Gets the value that was selected by the user.

_addCSSClass

p._addCSSClass = function (cssClass)

Overwritten method that adds the class to main, button and listbox

Parameter

cssClassThe cssClass to be added

_removeCSSClass

p._removeCSSClass = function (cssClass)

Overwritten method that removes the specified CSS Class from main, button and listbox

Parameter

cssClassThe cssClass to be removed

_hideListBox

p._hideListBox = function ()

Hides the thyListBox element

_showListBox

p._showListBox = function ()

Shows the <thyListBox>element

Events Methods

_eventShowListBox

p._eventShowListBox = function ()

Returns the function that shows the ListBox

_eventShowListBoxOnFocus

p._eventShowListBoxOnFocus = function ()

Returns the function that shows the ListBox and press the button

Misc Operations

_eventHideAllDropDown

Checks on every mousedown event if the event was done out of dropList and in that case, just hide the list

p.initThyDropDownBox = function ()
Initialization method called before creation
p.setDefaultValue = function (value)
Sets the default value when widget is reset
p.getSelectedIndex = function ()
Returns the index of the selected option
p.getSelectedValue = function ()
Returns the value of the selected option
p.getSelectedContent = function ()
Returns the content of the selected option
p.getSelected = function ()
Returns a thyCollection with the index, the value and the content of the selected option
This is the basic ThyAPI Collection Element.
p.getContentByValue = function (value)
Returns the associated content with the specified value
p.addChild = function ()
Overloaded method that prevents the insertion of children in thyDropDownBox
This is the Drop Down Combo Box Element.
p.removeChild = function ()
Overloaded method that prevents the removal of children of thyDropDownBox
p.setName = function (name)
Overwritten method that sets the name of main, button and listbox and refreshes CSS Classes
p.setCSSClass = function (type)
Overloaded method that sets the CSS Class of main, button and listbox
p._destroy = function ()
Overloaded method that removes dropList from memory
p._reset = function ()
Resets dropList to defaultValue
p._populateContents = function (data)
Sets the contents of the thyDropDownBox.
p._sweepOutContents = function ()
Gets the value that was selected by the user.
p._addCSSClass = function (cssClass)
Overwritten method that adds the class to main, button and listbox
p._removeCSSClass = function (cssClass)
Overwritten method that removes the specified CSS Class from main, button and listbox
p._hideListBox = function ()
Hides the thyListBox element
This is the ListBox Element, derivate from thyGridPanel.
p._showListBox = function ()
Shows the <thyListBox>element
p._eventShowListBox = function ()
Returns the function that shows the ListBox
p._eventShowListBoxOnFocus = function ()
Returns the function that shows the ListBox and press the button
This is the basic Cell element.
Button Widget
Base class for all other ThyAPI GUI Components
This is a Panel that has a Label.
This is the edit box to be used in ThyAPI.