[fxruby-users] Popup menu attached to a FXTreeItem

thom01 thom01 at laposte.net
Fri Aug 5 14:08:41 EDT 2005


Hi,

I'm using FXRuby 1.0 on Windows.
I'd like to display a popup menu after a right click on a tree
item, I cannot make it work :
#--------------------
root = FXTreeList.new(parent, 1, self, 0) 

pop = FXMenuPane.new(parent)
      
expandCmd = FXMenuCommand.new(pop, "Expand", nil, app)
expandCmd.connect(SEL_COMMAND)
  { root.currentItem.expanded=(true) }
     
root.connect(SEL_RIGHTBUTTONRELEASE) do |sender, selector, data|
  pop.popup(root, data.rootclick_x, data.rootclick_y)
end
#---------------------

The same kind of code works with a FXTabItem instead of
FXTreeItem.
Would FXRuby 1.2 change something ?

Thanks

Thomas

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)






More information about the fxruby-users mailing list