Method: CDK::FSELECT#setContents

Defined in:
lib/cdk/components/fselect.rb

#setContents(list, list_size) ⇒ Object

this sets the contents of the widget



768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/cdk/components/fselect.rb', line 768

def setContents(list, list_size)
  scrollp = @scroll_field
  entry = @entry_field

  if !self.createList(list, list_size)
    return
  end

  # Set the information in the scrolling list.
  scrollp.set(@dir_contents, @file_counter, false, scrollp.highlight,
      scrollp.box)

  # Clean out the entry field.
  self.setCurrentItem(0)
  entry.clean

  # Redraw the widget.
  self.erase
  self.draw(@box)
end