ListCtrl LC_REPORT undefined method

Hi

Inserting an item with several columns into a ListCtrl:

def add_items(items)
i = 0
items.each do |data|
self.insert_item(i, data[0])
self.set_item(i,1,data[1])
self.set_item(i,2,data[2])
i += 1
end
end
end

works fine but I am unable to set the background colour of the item:

self.set_item_background_colour(i,RED)

gives: undefined method: set_item_background_colour

Version is 1.9.4-i386-mswin32

Ideas?

Refreshing that the Scottish heritage of wxWidgets influences spelling:
I am so used to color as opposed to colour.

I can only assume that ListCtrl#set_item_background_colour is not
supported by MSW so I have used ListItem#set_background_colour
successfully instead.

Richard W. wrote:

I can only assume that ListCtrl#set_item_background_colour is not
supported by MSW so I have used ListItem#set_background_colour
successfully instead.

Missed your earlier message. From the wxWidgets headers it looks like
set_item_background_colour should be supported on MSW, Mac and generic,
but it’s missing currently from wxRuby. We can add it for the next
release.

Thanks for the report.

alex

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs