Class: SKUI::RadioButton

Inherits:
Checkbox show all
Defined in:
src/SKUI/radiobutton.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary

Attributes inherited from Control

#rect

Attributes inherited from Base

#properties, #window

Instance Method Summary collapse

Methods inherited from Checkbox

#check, #checked, #checked?, #initialize, #label, #toggle, #uncheck

Methods inherited from Control

#enabled, #initialize, #left, #name, #position, #release, #size, #stretch, #tab_index, #tooltip, #visible, #width, #z_index

Methods inherited from Base

#background_color, #font, #foreground_color, #initialize, #inspect, #parent, #release, #to_js, #typename, #ui_id

Methods included from Events

#add_event_handler, included, #initialize, #release_events, #trigger_event

Constructor Details

This class inherits a constructor from SKUI::Checkbox

Instance Method Details

#checked_siblingRadioButton

Returns:

Since:

  • 1.0.0



11
12
13
# File 'src/SKUI/radiobutton.rb', line 11

def checked_sibling
  siblings.find { |radio_button| radio_button.checked? }
end

#siblingsArray<RadioButton>

Returns:

Since:

  • 1.0.0



17
18
19
# File 'src/SKUI/radiobutton.rb', line 17

def siblings
  parent.controls.grep( RadioButton )
end