Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Drop-down select list
It's the usual select box which opens a drop-down list when clicked on, similar to the <select>
html tag.
val create :
?dst:Layout.t ->
?name:string ->
?action:(int -> unit) ->
?fg:Draw.color ->
?hmargin:int ->
string array ->
int ->
t
For instance create [| "A"; "B"; "C" |] 1
will create a select box with default choice "B"
. The action
(if specified) takes as argument the index of the selected item.
val selected : t -> int
The index (starting from 0) of the selected item.
val set_label : t -> string -> unit
Modify the label.
val set_action : t -> (int -> unit) -> unit
Modify the action.