Sha256: aeb762ad6f5856be7ecc6b408924222f5a583cd8c187067a8b6d8b696076ee5d

Contents?: true

Size: 355 Bytes

Versions: 4

Compression:

Stored size: 355 Bytes

Contents

# Superclass of a variety of controls that display lists of items (eg
# Choice, ListBox, CheckListBox)
class Wx::ControlWithItems
  # Make these ruby enumerables so find, find_all, map etc are available 
  include Enumerable
  # Passes each valid item index into the passed block
  def each
    0.upto(get_count - 1) { | i | yield i }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wxruby3-0.9.0.pre.beta.9-x64-mingw-ucrt lib/wx/core/controlwithitems.rb
wxruby3-0.9.0.pre.beta.8-x64-mingw-ucrt lib/wx/core/controlwithitems.rb
wxruby3-0.9.0.pre.beta.2-x64-mingw-ucrt-3.2-3.2.2 lib/wx/core/controlwithitems.rb
wxruby3-0.9.0.pre.beta.1-x64-mingw-ucrt-3.2 lib/wx/core/controlwithitems.rb