git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32224
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
"GenericDirCtrl",
"ListBox",
"ListCtrl",
"GenericDirCtrl",
"ListBox",
"ListCtrl",
+ "ListCtrl With GridLines",
"RadioBox",
"RadioButton",
"ScrollBar",
"RadioBox",
"RadioButton",
"ScrollBar",
widget.Update()
self.Update()
widget.Update()
self.Update()
# make it visible again for the user to compare
widget.SetPosition(visiblePos)
# make it visible again for the user to compare
widget.SetPosition(visiblePos)
wdc = wx.WindowDC(w)
dc.Blit(0,0, sz.width, sz.height, wdc, 0, 0)
else:
wdc = wx.WindowDC(w)
dc.Blit(0,0, sz.width, sz.height, wdc, 0, 0)
else:
- wx.DrawWindowOnDC(w, dc, method)
-
+ ##wx.DrawWindowOnDC(w, dc, method)
+ wx.DrawWindowOnDC(w, dc)
+
dc.SelectObject(wx.NullBitmap)
bmp.SetMaskColour(maskClr)
self.right.SetBMP(bmp, method)
dc.SelectObject(wx.NullBitmap)
bmp.SetMaskColour(maskClr)
self.right.SetBMP(bmp, method)
w.SetSelection(2)
self.DoWidget(w)
w.SetSelection(2)
self.DoWidget(w)
- def TestListCtrl(self, p):
- w = wx.ListCtrl(p, -1, size=(250, 100), style=wx.LC_REPORT)
+ def TestListCtrl(self, p, useGridLines=False):
+ style=wx.LC_REPORT
+ if useGridLines:
+ style = style | wx.LC_HRULES | wx.LC_VRULES
+ w = wx.ListCtrl(p, -1, size=(250, 100), style=style)
w.InsertColumn(0, "Col 1")
w.InsertColumn(1, "Col 2")
w.InsertColumn(2, "Col 3")
w.InsertColumn(0, "Col 1")
w.InsertColumn(1, "Col 2")
w.InsertColumn(2, "Col 3")
w.SetStringItem(x, 1, str(x))
w.SetStringItem(x, 2, str(x))
self.DoWidget(w)
w.SetStringItem(x, 1, str(x))
w.SetStringItem(x, 2, str(x))
self.DoWidget(w)
+
+ def TestListCtrl_With_GridLines(self, p):
+ self.TestListCtrl(p, True)
+
def TestRadioBox(self, p):
w = wx.RadioBox(p, -1, "RadioBox",
choices=testChoices2, majorDimension=3)
def TestRadioBox(self, p):
w = wx.RadioBox(p, -1, "RadioBox",
choices=testChoices2, majorDimension=3)
%rename(StopWatch) wxStopWatch;
%rename(FileHistory) wxFileHistory;
%rename(SingleInstanceChecker) wxSingleInstanceChecker;
%rename(StopWatch) wxStopWatch;
%rename(FileHistory) wxFileHistory;
%rename(SingleInstanceChecker) wxSingleInstanceChecker;
+%rename(DrawWindowOnDC) wxDrawWindowOnDC;
%rename(TipProvider) wxTipProvider;
%rename(PyTipProvider) wxPyTipProvider;
%rename(ShowTip) wxShowTip;
%rename(TipProvider) wxTipProvider;
%rename(PyTipProvider) wxPyTipProvider;
%rename(ShowTip) wxShowTip;
//---------------------------------------------------------------------------
// Experimental...
//---------------------------------------------------------------------------
// Experimental...
%{
#ifdef __WXMSW__
#include <wx/msw/private.h>
%{
#ifdef __WXMSW__
#include <wx/msw/private.h>
-void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
+bool wxDrawWindowOnDC(wxWindow* window, const wxDC& dc
+#if 0
+ , int method
+#endif
+ )
switch (method)
{
case 1:
switch (method)
{
case 1:
- // This one works much better, except for on XP. On Win2k nearly
- // all widgets and their children are captured correctly[**]. On
- // XP with Themes activated most native widgets draw only
- // partially, if at all. Without themes it works just like on
- // Win2k.
+#endif
+ // This one works much better, nearly all widgets and their
+ // children are captured correctly[**]. Prior to the big
+ // background erase changes that Vadim did in 2004-2005 this
+ // method failed badly on XP with Themes activated, most native
+ // widgets draw only partially, if at all. Without themes it
+ // worked just like on Win2k. After those changes this method
+ // works very well.
//
// ** For example the radio buttons in a wxRadioBox are not its
// children by default, but you can capture it via the panel
//
// ** For example the radio buttons in a wxRadioBox are not its
// children by default, but you can capture it via the panel
::SendMessage(GetHwndOf(window), WM_PRINT, (long)GetHdcOf(dc),
PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN |
PRF_ERASEBKGND | PRF_OWNED );
::SendMessage(GetHwndOf(window), WM_PRINT, (long)GetHdcOf(dc),
PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN |
PRF_ERASEBKGND | PRF_OWNED );
PRF_ERASEBKGND | PRF_OWNED );
}
}
PRF_ERASEBKGND | PRF_OWNED );
}
}
+#endif // 0
+#else
+ return false;
+#endif // __WXMSW__
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------