From: Lyle Johnson Date: 2005-11-17T02:08:11+09:00 Subject: Re: FXRuby, FXTreeList On 11/16/05, Alexander Fleck wrote: > I' ve created a TreeList that shows the files in a directory. How can I create a context menu that pops up, when I right-click on a selected item? I know how to create the popup menu, but how can I prevent it to get shown when I click somewhere else than the item? Do I have to remember the items I selected and then check if it' s under the cursor when right-clicking? I think that I'd just call FXTreeList#getItemAt(event.win_x, event.win_y) to determine which item was right-clicked. If the user right-clicked somewhere outside of an item, getItemAt() ought to return nil.