[fxruby-users] FXTreeList, single and double clicks events

Philippe Lang philippe.lang at attiksystem.ch
Tue Oct 24 16:06:00 EDT 2006


Hi,

When double-clicking on an item in an FXTreeList, both SEL_CLICKED and SEL_DOUBLECLICKED events are generated.


  @treelistframe = FXVerticalFrame.new(@group_left,
    FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y,
    0, 0, 0, 0, 0, 0, 0, 0)
    
  @tree = FXTreeList.new(@treelistframe, nil, 0, 
    LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_RIGHT|TREELIST_SHOWS_LINES|
    TREELIST_SHOWS_BOXES|TREELIST_ROOT_BOXES|TREELIST_EXTENDEDSELECT)

  @tree.connect(SEL_CLICKED, method(:onClick))
  @tree.connect(SEL_DOUBLECLICKED, method(:onDoubleClick))

  def onClick(sender, sel, data)
    puts "click"               
  end
  
  def onDoubleClick(sender, sel, data)
    puts "double-click"
  end


Is that a feature of Fox, or a small bug maybe?

Cheers,

---------------
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/20061024/b83b9057/attachment.bin 


More information about the fxruby-users mailing list