Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Redraw rows
Redraw rows [message #42796] |
Fri, 04 April 2014 11:57 |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
Hello,
I'm having a problem for some time now. It keeps occuring in new places since I use the ArrayCtrl a lot in my application. I used a function I got from the forum once to set all cells in a row to use a specific Display class. I want to color the text of some rows red. The following code is the function.
void ArrayCtrl::SetRowDisplay(int i, const Display& d)
{
if(i >= 0 && i < GetCount())
for (int j = 0 ; j < GetSize().cx ; j++)
cellinfo.At(i).At(j).Set(d);
RefreshRow(i);
}
When I use virtual counts and I force the control to refresh by, for example, resizing it, the rows turn red as I desired. However, in very many situations the rows don't turn red before I manually resize it. It doesn't matter what I call: SetVirtualCount, Refresh, SetCount, Add, etc. Nothing works to show me the rows in red. What is the problem? Can the control be refreshed so I can see my rows in red?
Regards,
crydev
|
|
|
Re: Redraw rows [message #42797 is a reply to message #42796] |
Fri, 04 April 2014 12:27 |
|
Hi crydev,
I don't know much about ArrayCtrl, but have you tried to call Layout()? That is called when resizing, so perhaps it would help to trigger the display update you need. Of course, even if it works, it's a workaround at best
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 05:29:00 CEST 2024
Total time taken to generate the page: 0.02997 seconds
|