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:
@@ -149,6 +149,7 @@ class MyCellEditor(wxPyGridCellEditor):
|
|||||||
# For this example, replace the text. Normally we would append it.
|
# For this example, replace the text. Normally we would append it.
|
||||||
#self._tc.AppendText(ch)
|
#self._tc.AppendText(ch)
|
||||||
self._tc.SetValue(ch)
|
self._tc.SetValue(ch)
|
||||||
|
self._tc.SetInsertionPointEnd()
|
||||||
else:
|
else:
|
||||||
evt.Skip()
|
evt.Skip()
|
||||||
|
|
||||||
|
@@ -22,7 +22,8 @@ class TestPanel(wxPanel):
|
|||||||
lb.SetSelection(0)
|
lb.SetSelection(0)
|
||||||
self.lb = lb
|
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_BUTTON(self, btn.GetId(), self.OnTestButton)
|
||||||
|
|
||||||
EVT_RIGHT_UP(self, self.OnDoPopup)
|
EVT_RIGHT_UP(self, self.OnDoPopup)
|
||||||
|
@@ -68,9 +68,9 @@ class TestPanel(wxPanel):
|
|||||||
|
|
||||||
|
|
||||||
bsizer = wxBoxSizer(wxVERTICAL)
|
bsizer = wxBoxSizer(wxVERTICAL)
|
||||||
bsizer.Add(b, 0, wxGROW)
|
bsizer.Add(b, 0, wxGROW|wxALL, 4)
|
||||||
bsizer.Add(b2, 0, wxGROW)
|
bsizer.Add(b2, 0, wxGROW|wxALL, 4)
|
||||||
bsizer.Add(b3, 0, wxGROW)
|
bsizer.Add(b3, 0, wxGROW|wxALL, 4)
|
||||||
|
|
||||||
sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6)
|
sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6)
|
||||||
sizer.AddMany([ l1, t1, (0,0),
|
sizer.AddMany([ l1, t1, (0,0),
|
||||||
|
@@ -15,7 +15,7 @@ class TestToolBar(wxFrame):
|
|||||||
|
|
||||||
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
|
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
|
# wxTB_VERTICAL
|
||||||
#tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize,
|
#tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize,
|
||||||
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
||||||
@@ -23,7 +23,8 @@ class TestToolBar(wxFrame):
|
|||||||
|
|
||||||
self.CreateStatusBar()
|
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(self, 10, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user