views:

31

answers:

1

Hi I am trying to change an individual item in a listCtrl in erlang.

I initialize listCtrl then I goto set the item as follows:

wxListCtrl:setItem(ListCtrl, Row, 1, io_lib:format("~.2f",[VolumeB + 0.00 ])),
    wxListCtrl:setItemBackgroundColour(ListCtrl, 1, ?wxRED),

Problem is the background color of the entire row is red, I only want one column in one row to change, not the entire row.

This is a tough one, at least for me, I haven't seen any simple straight forward docs.

A: 

wx is an Erlang port/wrapper of wxWidgets, so if you're having trouble with things like wxListCtrl:SetItemBackgroundColour(), you'll probably have more luck with the wxWidgets documentation than the (Erlang) wx documentation: listCtrl documentation at docs.wxwidgets.org

That said, a quick Google suggests that wxListCtrl doesn't provide a way to specify the background color of a column or a cell.

MatthewToday