Stk.ButtonSourceButtons.
Property used to indicate whether a toggle or option button is activate.
class button : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> unit -> object ... endSimple button.
val button :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?pack:(Widget.widget -> unit) ->
unit ->
buttonConvenient function to create a button. See Widget arguments for arguments.
val text_button :
?classes:string list ->
?label_classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?text:string ->
?pack:(Widget.widget -> unit) ->
unit ->
button * Text.labelConvenient function to create a button with a Text.label as child. text optional argument is passed to Text.label. label_class is passed as ?class_ argument when creating label. See Widget arguments for other arguments.
class togglebutton : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> unit -> object ... endA toggle button. State is represented by the active property. Activating the widget toggles the state.
val togglebutton :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?active:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
togglebuttonConvenient function to create a togglebutton. Initial state can be specifier with the active argument (default is false). See Widget arguments for other arguments.
val text_togglebutton :
?classes:string list ->
?label_classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?active:bool ->
?text:string ->
?pack:(Widget.widget -> unit) ->
unit ->
togglebutton * Text.labelConvenient function to create a togglebutton with a Text.label as child. Initial state can be specifier with the active argument (default is false). text optional argument is passed to Text.label. label_class is passed as ?class_ argument when creating label. See Widget arguments for other arguments.
A group is used to share a state among several checkbuttons, so they act as radio buttons (only one can be active at the same time).
The following properties are used to tune the appearance of checkbuttons: a font and active and inactive characters.
class checkbutton : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> unit -> object ... endThe checkbutton widget.
val checkbutton :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?group:group ->
?active:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
checkbuttonConvenient function to create a checkbutton. Initial state can be specifier with the active argument (default is false). See Widget arguments for other arguments.
val radiobutton :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?group:group ->
?active:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
checkbuttonConvenient function to create a checkbutton acting as a radio button (with class "radiobutton"). Initial state can be specifier with the active argument (default is false). group can be used to set the group the radio button belongs to. See Widget arguments for other arguments.
val text_checkbutton :
?classes:string list ->
?label_classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?group:group ->
?active:bool ->
?text:string ->
?pack:(Widget.widget -> unit) ->
unit ->
checkbutton * Text.labelConvenient function to create a checkbutton with a Text.label as child. Initial state can be specifier with the active argument (default is false). text optional argument is passed to Text.label. label_classes is passed as ?classes argument when creating label. See Widget arguments for other arguments.
val text_radiobutton :
?classes:string list ->
?label_classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?group:group ->
?active:bool ->
?text:string ->
?pack:(Widget.widget -> unit) ->
unit ->
checkbutton * Text.labelConvenient function to create a checkbutton acting as a radio button (with class "radiobutton") with a Text.label as child. Initial state can be specifier with the active argument (default is false). group can be used to set the group the radio button belongs to. text optional argument is passed to Text.label. label_classes is passed as ?classes argument when creating label. See Widget arguments for other arguments.