# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A radio button item is a button which usually denotes one of several mutually exclusive options. # It has a text label next to a (usually) round button. # Radio buttons are typically used in groups of mutually-exclusive buttons, i.e. exactly one of the buttons in the group is checked, and the other ones are unchecked automatically. Such groups are created implicitly, but can also be started explicitly by using {Wx::RB_GROUP} style: a button with this style starts a new group and will become the initial selection in this group. Alternatively, a radio button may be excluded from the group that it would otherwise belong to by using {Wx::RB_SINGLE} style. # To find the other elements of the same radio button group, you can use {Wx::RadioButton#get_first_in_group}, {Wx::RadioButton#get_previous_in_group}, {Wx::RadioButton#get_next_in_group} and {Wx::RadioButton#get_last_in_group} functions. # === Styles # # This class supports the following styles: # # - {Wx::RB_GROUP}: Marks the beginning of a new group of radio buttons. # - {Wx::RB_SINGLE}: Creates a radio button which is not part of any radio button group. When this style is used, no other radio buttons will be turned off automatically when this button is turned on and such behaviour will need to be implemented manually, in the event handler for this button. # # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::CommandEvent} events. # Event handler methods for events emitted by this class: # - {Wx::EvtHandler#evt_radiobutton}(id, meth = nil, &block): Process a {Wx::EVT_RADIOBUTTON} event, when the radiobutton is clicked. # # === # # Category: {Wx::Controls}
{Wx::MSW} Appearance # | {Wx::GTK} Appearance # | {Wx::OSX} Appearance # |
SetValue(true)
will also set focus to the radio button if the focus had previously been on another radio button in the same group as otherwise setting it on wouldn't work.
# @param value [true,false] true to check, false to uncheck.
# @return [void]
def set_value(value) end
alias_method :value=, :set_value
# Returns the first button of the radio button group this button belongs to.
# For a radio button with {Wx::RB_SINGLE} style, this function returns this button itself, as it is the only member of its group. Otherwise, the function returns the closest previous radio button with {Wx::RB_GROUP} style (which could still be this button itself) or the first radio button in the same window.
# The returned value is never NULL.
# @see Wx::RadioButton#get_previous_in_group
# @see Wx::RadioButton#get_next_in_group
# @see Wx::RadioButton#get_last_in_group
# @return [Wx::RadioButton]
def get_first_in_group; end
alias_method :first_in_group, :get_first_in_group
# Returns the last button of the radio button group this button belongs to.
# Similarly to {Wx::RadioButton#get_first_in_group}, this function returns this button itself if it has {Wx::RB_SINGLE} style. Otherwise, the function returns the last button before the next button with {Wx::RB_GROUP} style or the last radio button in the same window.
# The returned value is never NULL.
# @see Wx::RadioButton#get_previous_in_group
# @see Wx::RadioButton#get_next_in_group
# @return [Wx::RadioButton]
def get_last_in_group; end
alias_method :last_in_group, :get_last_in_group
# Returns the previous radio button in the same group.
# The return value is NULL if there is no predecessor or if this button has {Wx::RB_SINGLE} style.
# @see Wx::RadioButton#get_first_in_group
# @see Wx::RadioButton#get_next_in_group
# @see Wx::RadioButton#get_last_in_group
# @return [Wx::RadioButton]
def get_previous_in_group; end
alias_method :previous_in_group, :get_previous_in_group
# Returns the next radio button in the same group.
# The return value is NULL if there is no successor or if this button has {Wx::RB_SINGLE} style.
# @see Wx::RadioButton#get_first_in_group
# @see Wx::RadioButton#get_previous_in_group
# @see Wx::RadioButton#get_last_in_group
# @return [Wx::RadioButton]
def get_next_in_group; end
alias_method :next_in_group, :get_next_in_group
end # RadioButton
end