Le 08/05/2013 02:03, Richard Terry a écrit : > Hi List, > > ... > > However, lets say I want to popup a menu of the letters collection: > > If I right mouse click on the list to bring up the menu the > cvwLetters_Menu event triggers, but if one inspects the cvwLetters > control itself in the IDE, the cvwLetters.item.key is null, however the > cvwletters.selected[0] does contain the value one would expect to be in > the cvwLetters.item.key. > > I've tried doing e.g cvwLetters.movecurrent() before popping up the > menu, this does not seem to make much difference.
The Menu event is not an event managed by the ColumnView control, but by its Control parent class. This is the reason why the Item property is not set during the Menu event handler. The Menu event is raised even if you don't click on an item. Normally, the Click event will be raised before the Menu event, and so you can store the key of the ColumnView.Item property during the Click event handler (which is a ColumnView event) to use it later during the Menu event handler. > > Also I've a chronic problem trying to generate a columnview click event > in code, with a similar outcome to the above - the item.key is not set The Item property *is* set during a Click event handler. What are you talking about with "generate a columnview click event"? -- Benoît Minisini ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
