class Fox::FXComboTableItem
Public Class Methods
Source
# File lib/fox16/core.rb, line 491 def initialize(text, ic=nil, ptr=nil) super(nil, ic, ptr) self.selections = text end
Construct new combobox table item
Calls superclass method
Fox::FXTableItem::new
Public Instance Methods
Source
# File lib/fox16/core.rb, line 497 def getControlFor(table) combo = FXComboBox.new(table, 1, :opts => COMBOBOX_STATIC, :padLeft => table.marginLeft, :padRight => table.marginRight, :padTop => table.marginTop, :padBottom => table.marginBottom) combo.create justify = 0 justify |= JUSTIFY_LEFT if (self.justify & FXTableItem::LEFT) != 0 justify |= JUSTIFY_RIGHT if (self.justify & FXTableItem::RIGHT) != 0 justify |= JUSTIFY_TOP if (self.justify & FXTableItem::TOP) != 0 justify |= JUSTIFY_BOTTOM if (self.justify & FXTableItem::BOTTOM) != 0 combo.justify = justify combo.font = table.font combo.backColor = table.backColor combo.textColor = table.textColor combo.selBackColor = table.selBackColor combo.selTextColor = table.selTextColor combo.fillItems(selections) combo.text = text combo.numVisible = [20, combo.numItems].min combo end
Create input control for editing this item
Source
# File lib/fox16/core.rb, line 533 def selections @selections end
Return selections
Source
# File lib/fox16/core.rb, line 523 def selections=(strings) @selections = strings if @selections.empty? self.text = nil else self.text = @selections[0] end end
Set selections as an array of strings
Source
# File lib/fox16/core.rb, line 518 def setFromControl(comboBox) self.text = comboBox.text end
Set value from input control