demo tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-11-22 22:32:36 +00:00
parent e3ecd8d90b
commit 8a69a46a6c
4 changed files with 9 additions and 6 deletions

View File

@@ -149,6 +149,7 @@ class MyCellEditor(wxPyGridCellEditor):
# For this example, replace the text. Normally we would append it.
#self._tc.AppendText(ch)
self._tc.SetValue(ch)
self._tc.SetInsertionPointEnd()
else:
evt.Skip()

View File

@@ -22,7 +22,8 @@ class TestPanel(wxPanel):
lb.SetSelection(0)
self.lb = lb
btn = wxButton(self, -1, "Test SetString", (180, 50))
pos = lb.GetPosition().x + lb.GetSize().width + 25
btn = wxButton(self, -1, "Test SetString", (pos, 50))
EVT_BUTTON(self, btn.GetId(), self.OnTestButton)
EVT_RIGHT_UP(self, self.OnDoPopup)

View File

@@ -68,9 +68,9 @@ class TestPanel(wxPanel):
bsizer = wxBoxSizer(wxVERTICAL)
bsizer.Add(b, 0, wxGROW)
bsizer.Add(b2, 0, wxGROW)
bsizer.Add(b3, 0, wxGROW)
bsizer.Add(b, 0, wxGROW|wxALL, 4)
bsizer.Add(b2, 0, wxGROW|wxALL, 4)
bsizer.Add(b3, 0, wxGROW|wxALL, 4)
sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6)
sizer.AddMany([ l1, t1, (0,0),

View File

@@ -15,7 +15,7 @@ class TestToolBar(wxFrame):
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT)
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT|wxTB_TEXT)
# wxTB_VERTICAL
#tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize,
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
@@ -23,7 +23,8 @@ class TestToolBar(wxFrame):
self.CreateStatusBar()
tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
#tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
tb.AddLabelTool(10, "New", images.getNewBitmap(), shortHelp="New", longHelp="Long help for 'New'")
EVT_TOOL(self, 10, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)