Re: wx 3.3.0, wxGrid and custom renderer problems.

Tony Kennedy <[email protected]> Fri, 4 Jul 2025 06:56:04 -0700 (PDT)
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Yes, if I just draw in the rect, all works fine.

Tony.


On Friday, 4 July 2025 at 14:46:06 UTC+1 AliKet wrote:

> Does it help if you restrict the drawing to just *_ rect _*? i.e.: set a 
> clipping rectangle to _rect_ before drawing anything ?
>
> On Friday, July 4, 2025 at 8:40:00 AM UTC+1 Tony Kennedy wrote:
>
>> Think I've found the issue. In the "Draw" function for my custom 
>> renderer, I call "dc.Clear()". This seems to clear the entire grid, not 
>> just the area to be rendered. If I comment this out, I get the rest of the 
>> grid drawing correctly, just not my cell.
>>
>> void wxCustomCellRenderer::Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& 
>> dc, const wxRect& rect, int row, int col, bool isSelected)
>> {
>>     dc.Clear();
>>
>>
>>
>> On Friday, 4 July 2025 at 08:25:12 UTC+1 Tony Kennedy wrote:
>>
>>> Hi all,
>>>
>>> I've got a wxGrid, and for one of the columns, I define a custom 
>>> renderer. This was working fine in wx 3.1.5 and 3.2.6, but now I've updated 
>>> to 3.3.0, most of the grid does not display properly if I enable the custom 
>>> renderer.
>>>
>>> Is anyone aware of any problems with this?
>>>
>>> Thanks in advance,
>>>
>>> Tony.
>>>
>>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/c9c55409-d7ed-495f-9cab-68988a3f8664n%40googlegroups.com.