Class: Shoes::ListBox
Instance Attribute Summary
Attributes inherited from Native
Attributes inherited from Basic
#args, #cleared, #hided, #initials, #parent, #shows
Attributes included from Mod
#click_proc, #hover_proc, #hovered, #leave_proc, #margin_bottom, #margin_left, #margin_right, #margin_top, #release_proc
Instance Method Summary collapse
Methods inherited from Native
Methods inherited from Basic
#clear, #fix_size, #hide, #initialize, #move, #move2, #move3, #positioning, #remove, #show, #style, #toggle
Methods included from Mod
#click, #hover, #leave, #release, #set_margin
Constructor Details
This class inherits a constructor from Shoes::Basic
Instance Method Details
#change(&blk) ⇒ Object
407 408 409 |
# File 'lib/shoes/basic.rb', line 407 def change &blk super @real, &blk end |
#choose(item) ⇒ Object
403 404 405 |
# File 'lib/shoes/basic.rb', line 403 def choose item @real.active = @items.index item end |
#items=(items) ⇒ Object
411 412 413 414 415 |
# File 'lib/shoes/basic.rb', line 411 def items= items @items.length.times{real.remove_text 0} @items = items items.each{|item| real.append_text item.to_s} end |
#text ⇒ Object
399 400 401 |
# File 'lib/shoes/basic.rb', line 399 def text @items[@real.active] end |