Hi all, I''m using a ListCtrl on LC_REPORT mode. using set_item(index, col, ''value'') the list does''t get populated. Is it a bug? which is the method to call? i''m using ruby 1.8.6 wxruby 1.9.8 mswin32 on winXP attached is an example. thank you. bio. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
The problem is, set_item() need to have a valid item in which to set information on. So change the following code to represent this: insert_item(0, ''Item 0 col 0'') set_item(0, 1, ''Item 0 col 1'') insert_item(1, ''Item 1 col 0'') set_item(1, 1, ''Item 1 col 1'') You will get better results this way, then the other way. On Fri, Oct 17, 2008 at 11:17 AM, Fabio Petrucci <fabio.petrucci at gmail.com>wrote:> Hi all, > > I''m using a ListCtrl on LC_REPORT mode. > > using set_item(index, col, ''value'') the list does''t get populated. > > Is it a bug? which is the method to call? > > i''m using ruby 1.8.6 wxruby 1.9.8 mswin32 on winXP > > attached is an example. > > thank you. > > bio. > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081018/075aaa84/attachment.html>
Thank you Mario, now is ok :) bio. On Sat, Oct 18, 2008 at 8:02 AM, Mario Steele <mario at ruby-im.net> wrote:> The problem is, set_item() need to have a valid item in which to set > information on. So change the following code to represent this: > > insert_item(0, ''Item 0 col 0'') > set_item(0, 1, ''Item 0 col 1'') > insert_item(1, ''Item 1 col 0'') > set_item(1, 1, ''Item 1 col 1'') > > You will get better results this way, then the other way. > > On Fri, Oct 17, 2008 at 11:17 AM, Fabio Petrucci <fabio.petrucci at gmail.com > > wrote: > >> Hi all, >> >> I''m using a ListCtrl on LC_REPORT mode. >> >> using set_item(index, col, ''value'') the list does''t get populated. >> >> Is it a bug? which is the method to call? >> >> i''m using ruby 1.8.6 wxruby 1.9.8 mswin32 on winXP >> >> attached is an example. >> >> thank you. >> >> bio. >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> > > > > -- > Mario Steele > http://www.trilake.net > http://www.ruby-im.net > http://rubyforge.org/projects/wxruby/ > http://rubyforge.org/projects/wxride/ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081020/ce26313e/attachment.html>
Hi Firstly, sorry haven''t been following the list for the last week or so. Have been away with work and pretty busy and haven''t had time to follow up everything. Fabio Petrucci wrote:> Thank you Mario, now is ok :) > > bio. > > On Sat, Oct 18, 2008 at 8:02 AM, Mario Steele <mario at ruby-im.net > <mailto:mario at ruby-im.net>> wrote: > > The problem is, set_item() need to have a valid item in which to > set information on. So change the following code to represent this: > > insert_item(0, ''Item 0 col 0'') > set_item(0, 1, ''Item 0 col 1'') > insert_item(1, ''Item 1 col 0'') > set_item(1, 1, ''Item 1 col 1'') >Seeing this laid out plainly makes me think we must be able to come up with a syntax improvement. I was thinking of something that accepts an array for each row and just does the right thing.... append [ "item 0 col 0", "item 0 col 1"], [ "item 1 col 0", "item 1 col 1"] ... alex