ComboBoxChoice

Package: Libraries.Interface.Controls · Inherits from: Libraries.Interface.Item, Libraries.Interface.Controls.Control, Libraries.Interface.Item2D, Libraries.Language.Object, Libraries.Interface.Controls.ListItem

The ComboBoxChoice class is a row of a ComboBox's open list. It is a ListItem that looks like any other, except for the row under the mouse: that row is tinted with the mouse-over color of the interface options key "ComboBoxChoice", a light gray, so other lists keep their own look. The row the keyboard highlights keeps the list's selection color, even with the mouse on it. The ComboBox makes its rows itself, so most programs never make one.

Example Code

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page
use Libraries.Interface.Controls.ComboBox

Form form
Page page = form:GetMainPage()

// The rows of the list that opens are ComboBoxChoices.
ComboBox sizes
sizes:SetName("Size")
sizes:Add("Small")
sizes:Add("Large")
page:Add(sizes)

form:Display()

Actions

BeginMouseOver()

This action is called when the mouse moves onto the row. It tints the row and asks the display to draw again, so the tint shows at once.

Example

use Libraries.Interface.Controls.ComboBoxChoice

ComboBoxChoice choice
choice:BeginMouseOver()

EndMouseOver()

This action is called when the mouse moves off the row. It takes away the tint and asks the display to draw again.

Example

use Libraries.Interface.Controls.ComboBoxChoice

ComboBoxChoice choice
choice:BeginMouseOver()
choice:EndMouseOver()

GetMouseOverColor()

This action returns the color of the row while the mouse is on it: the mouse-over color of the interface options key "ComboBoxChoice", or, when that key has none, a list item's own mouse-over color.

Returns

Libraries.Game.Graphics.ColorGroup: The row's mouse-over color.

Example

use Libraries.Interface.Controls.ComboBoxChoice
use Libraries.Game.Graphics.ColorGroup

ComboBoxChoice choice
ColorGroup color = choice:GetMouseOverColor()

Inherited Actions

253 actions from Libraries.Interface.Controls.Control
18 actions from Libraries.Interface.Controls.ListItem
61 actions from Libraries.Interface.Item
202 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object