Hi, I am testing a virtual listctrl, and have run into some problems with changing the labels in it. The listctrl shows a bunch of rows and columns, and it gets activate events whenever I doubleclick on a cell. Works like a charm. My problem comes when I call the edit_label method, specifically that I think that I don't quite understand the argument passed to it (item as integer). This would seem to be the row, and when passed a row number, the edit control shows up just fine, for the first column. How would I go about to specifiy a label in another column? Thanks, Magnus Engström _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
On Sun, 2007-10-28 at 15:04 +0000, Alex Fenton wrote:> Hi Magnus > > Magnus Engstr?m wrote: > > My problem comes when I call the edit_label method, specifically that I > > think that I don''t quite understand the argument passed to it (item as > > integer). This would seem to be the row, and when passed a row number, > > the edit control shows up just fine, for the first column. How would I > > go about to specifiy a label in another column? > > > I was a bit surprised to find that editing a second column label is not > supported in wxWidgets, because the Windows native control doesn''t allow > that: > http://lists.wxwidgets.org/archive/wx-users/msg35847.html > > You could try using a Wx::Grid, or perhaps capturing evt_list_dclick, > and draw a TextCtrl yourself on top of the ListItem. > > hth > alexAh, Wx::Grid looks nice. Thanks. /Magnus
Hi Magnus Magnus Engstr?m wrote:> My problem comes when I call the edit_label method, specifically that I > think that I don''t quite understand the argument passed to it (item as > integer). This would seem to be the row, and when passed a row number, > the edit control shows up just fine, for the first column. How would I > go about to specifiy a label in another column? >I was a bit surprised to find that editing a second column label is not supported in wxWidgets, because the Windows native control doesn''t allow that: http://lists.wxwidgets.org/archive/wx-users/msg35847.html You could try using a Wx::Grid, or perhaps capturing evt_list_dclick, and draw a TextCtrl yourself on top of the ListItem. hth alex