Removed TABs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-15 23:07:21 +00:00
parent 57cb8e4e82
commit f83ca04634
25 changed files with 2665 additions and 2639 deletions

View File

@@ -203,6 +203,7 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin):
def OnItemSelected(self, event):
print event.GetItem().GetTextColour()
self.currentItem = event.m_itemIndex
self.log.WriteText("OnItemSelected: %s, %s, %s, %s\n" %
(self.currentItem,

View File

@@ -47,6 +47,9 @@ class TestPanel(wxPanel):
b3 = wxButton(self, -1, "Test WriteText")
EVT_BUTTON(self, b3.GetId(), self.OnTestWriteText)
self.tc = t3
b4 = wxButton(self, -1, "Test Simulated Event")
EVT_BUTTON(self, b4.GetId(), self.OnTestEvent)
l4 = wxStaticText(self, -1, "Rich Text")
t4 = wxTextCtrl(self, -1, "If supported by the native control, this is red, and this is a different font.",
@@ -71,6 +74,7 @@ class TestPanel(wxPanel):
bsizer.Add(b, 0, wxGROW|wxALL, 4)
bsizer.Add(b2, 0, wxGROW|wxALL, 4)
bsizer.Add(b3, 0, wxGROW|wxALL, 4)
bsizer.Add(b4, 0, wxGROW|wxALL, 4)
sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6)
sizer.AddMany([ l1, t1, (0,0),
@@ -129,6 +133,13 @@ class TestPanel(wxPanel):
% (ip, text[ip], lp, len(text)))
def OnTestEvent(self, evt):
ke = wxKeyEvent(wxEVT_CHAR)
ke.SetEventObject(self.tc1)
ke.SetId(self.tc1.GetId())
ke.m_keyCode = ord('A')
self.tc1.GetEventHandler().ProcessEvent(ke)
#---------------------------------------------------------------------------

View File

@@ -291,3 +291,4 @@ static wxPyCoreAPI API = {
%pragma(python) include="_extras.py";

View File

@@ -35,17 +35,26 @@ class MyFrame(wxFrame):
wxStaticText(panel, -1, "Size:",
wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize)
wxStaticText(panel, -1, "Pos:",
wxDLG_PNT(panel, wxPoint(4, 14)), wxDefaultSize)
wxDLG_PNT(panel, wxPoint(4, 18)), wxDefaultSize)
wxStaticText(panel, -1, "ScreenPos:",
wxDLG_PNT(panel, wxPoint(4, 32)), wxDefaultSize)
self.sizeCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(24, 4)),
wxDLG_PNT(panel, wxPoint(36, 4)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
self.posCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(24, 14)),
wxDLG_PNT(panel, wxPoint(36, 18)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
self.sposCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(36, 32)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
panel.Fit()
self.Fit()
# This method is called automatically when the CLOSE event is
# sent to this window
@@ -59,6 +68,8 @@ class MyFrame(wxFrame):
def OnSize(self, event):
size = event.GetSize()
self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height))
p = self.ClientToScreen((0,0))
self.sposCtrl.SetValue("%s, %s" % (p.x, p.y))
# tell the event system to continue looking for an event handler,
# so the default handler will get called.
@@ -69,6 +80,8 @@ class MyFrame(wxFrame):
def OnMove(self, event):
pos = event.GetPosition()
self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y))
p = self.ClientToScreen((0,0))
self.sposCtrl.SetValue("%s, %s" % (p.x, p.y))