Hi, The default action when double-clicking on an editable cell in an FXTable is to drop into "edit" mode for that cell. I would like to override that for a specific column in an FXTable, which contains a date. Double-clicking in that column launch a calendar editor. I have done that: @table.connect(SEL_DOUBLECLICKED) do |sender, selector, data| row = @table.selStartRow col = @table.selStartColumn case col when 1 CellEditorCalendar.new(self, @lignes, row, col).execute else # Use default double-click of FXTable? end end It works pretty well, except that I cannot figure out how to call the default FXTable code when double-click is done in a column != 1. Does anybody know how to do that? Thanks! --------------- Philippe Lang Attik System -------------- 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/20061006/2b37f90d/attachment.bin
On Oct 6, 2006, at 8:51 AM, Philippe Lang wrote:> Hi, > > The default action when double-clicking on an editable cell in an > FXTable is to drop into "edit" mode for that cell. > > I would like to override that for a specific column in an FXTable, > which contains a date. Double-clicking in that column launch a > calendar editor. > > I have done that: > > @table.connect(SEL_DOUBLECLICKED) do |sender, selector, data| > row = @table.selStartRow > col = @table.selStartColumn > > case col > when 1 > CellEditorCalendar.new(self, @lignes, row, > col).execute > else > # Use default double-click of FXTable? > end > end > > It works pretty well, except that I cannot figure out how to call > the default FXTable code when double-click is done in a column != 1. > > Does anybody know how to do that?Try sending the ID_START_INPUT command to the table: @table.handle(@table, FXSEL(SEL_COMMAND, FXTable::ID_START_INPUT), nil) Hope this helps, Lyle