wxTreeListCtrl Patch

Hello,
I hope this is the right place to submit patches (or should I use the
SF tracker?). Anyway, here's the patch to make wxTreeListCtrl use the
same keybindings as wxTreeCtrl on windows. Robin, note that I haven't
tested it on win32, because it's not possible for me at the moment.
However, I don't think there are problems.

Now, the supposed wxEditor bug I was reporting wasn't in fact a wxEditor
bug, but it seems a wxGTK2 one: it ignores the background colour in
wxDC.DrawText. A quick example:

import wx

app = wx.PySimpleApp()
frame = wx.Frame(None, -1, "Bug")
p1 = wx.Panel(frame, -1)

def on_paint(event):
    dc = wx.PaintDC(p1)
    dc.SetBackgroundMode(wx.SOLID)
    dc.SetTextForeground(wx.WHITE)
    dc.SetTextBackground(wx.BLUE)
    dc.SetBackground(wx.RED_BRUSH)
    dc.Clear()
    dc.DrawText("AAAAAAAAAAA", 10, 10)
    
wx.EVT_PAINT(p1, on_paint)

app.SetTopWindow(frame)
frame.Show()
app.MainLoop()

I tried to see if I could fix it, but, given my zero experience with
pango and gtk2 in general, I wasn't able to do it. (But I'm reporting it
on SF).

Alberto

treelistctrl.cpp.diff (3.16 KB)

Alberto Griggio wrote:

Hello,
I hope this is the right place to submit patches (or should I use the
SF tracker?).

For wxPython specific stuff directly to me or here is fine.

Anyway, here's the patch to make wxTreeListCtrl use the
same keybindings as wxTreeCtrl on windows. Robin, note that I haven't
tested it on win32, because it's not possible for me at the moment.
However, I don't think there are problems.

Thanks.

Now, the supposed wxEditor bug I was reporting wasn't in fact a wxEditor
bug, but it seems a wxGTK2 one: it ignores the background colour in
wxDC.DrawText.

I had wondered if that was the case, but hadn't tried it out yet. Thanks for doing this and submitting the bug report.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!