[fxruby-users] FXComboTableItem - where is my combo?

Philippe Lang philippe.lang at attiksystem.ch
Sun Sep 24 15:18:23 EDT 2006


Hi,

I'm trying to use an FXComboTableItem to edit the content of an FXTable cells.

The code I use is the following:


    #---------------------------
    # FXTable initialization
    #---------------------------
    @table = FXTable.new(@tabbook, nil, 0, TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 2,2,2,2)
    @table.visibleRows = 20
    @table.visibleColumns = 8
    @table.setTableSize(10, 4)
    # Initialize the scrollable part of the table
    (0..9).each do |r|
      (0..3).each do |c|
        @table.setItemText(r, c, "r:#{r} c:#{c}")
      end
    end
    # Initialize column headers
    (0...4).each  { |c| @table.setColumnText(c, Date::MONTHNAMES[c+1]) }
    # Initialize row headers
    (0...10).each { |r| @table.setRowText(r, "Row#{r}") }
    
    #---------------------------
    # FXTable events
    #---------------------------
    @table.connect(SEL_DOUBLECLICKED) do |sender, selector, data|  
        @table.setItem(data.row, data.col, FXComboTableItem.new(['a', 'b', 'c']))
    end


As soon as I double-click on a cell, it receives the "a" value, but no Combobox appears...

Sure that I'm doing something wrong. Does anyone have an example maybe?

Thanks

----------------
Philippe Lang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3125 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060924/c7547fcc/attachment.bin 


More information about the fxruby-users mailing list