various demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,7 +51,7 @@ demo item so you can learn how to use the classes yourself.</p>
|
||||
btn = html.FindWindowById(wxID_OK)
|
||||
btn.SetDefault()
|
||||
ir = html.GetInternalRepresentation()
|
||||
html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) )
|
||||
html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )
|
||||
self.SetClientSize(html.GetSize())
|
||||
self.CentreOnParent(wxBOTH)
|
||||
|
||||
|
@@ -13,7 +13,7 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
|
||||
|
||||
EVT_IDLE(self, self.OnIdle)
|
||||
|
||||
self.CreateGrid(25, 25)
|
||||
self.CreateGrid(25, 25) #, wxGrid.wxGridSelectRows)
|
||||
##self.EnableEditing(false)
|
||||
|
||||
# simple cell formatting
|
||||
|
@@ -29,7 +29,7 @@ _treeList = [
|
||||
'wxPyColourChooser',
|
||||
]),
|
||||
|
||||
# managed windows == things with a caption you can close
|
||||
# managed windows == things with a (optional) caption you can close
|
||||
('Base Frames and Dialogs', [
|
||||
'wxDialog',
|
||||
'wxFrame',
|
||||
@@ -298,9 +298,10 @@ class wxPythonDemo(wxFrame):
|
||||
findID = wxNewId()
|
||||
findnextID = wxNewId()
|
||||
menu = wxMenu()
|
||||
menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!')
|
||||
menu.Append(findID, '&Find\tCtrl-F', 'Find in the Demo Code')
|
||||
menu.Append(findnextID, 'Find &Next\tF3', 'Find Next')
|
||||
menu.AppendSeparator()
|
||||
menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!')
|
||||
EVT_MENU(self, helpID, self.OnHelpAbout)
|
||||
EVT_MENU(self, findID, self.OnHelpFind)
|
||||
EVT_MENU(self, findnextID, self.OnFindNext)
|
||||
|
@@ -10,8 +10,10 @@ wildcard = "Python source (*.py)|*.py|" \
|
||||
def runTest(frame, nb, log):
|
||||
dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
|
||||
if dlg.ShowModal() == wxID_OK:
|
||||
for path in dlg.GetPaths():
|
||||
log.WriteText('You selected: %s\n' % path)
|
||||
paths = dlg.GetPaths()
|
||||
log.WriteText('You selected %d files:' % len(paths))
|
||||
for path in paths:
|
||||
log.WriteText(' %s\n' % path)
|
||||
dlg.Destroy()
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
@@ -97,7 +97,10 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin):
|
||||
self.sm_dn = self.il.Add(images.getSmallDnArrowBitmap())
|
||||
|
||||
self.list = TestListCtrl(self, tID,
|
||||
style=wxLC_REPORT|wxSUNKEN_BORDER)#|wxLC_VRULES|wxLC_HRULES)
|
||||
style=wxLC_REPORT | wxSUNKEN_BORDER
|
||||
#| wxLC_NO_HEADER
|
||||
#| wxLC_VRULES | wxLC_HRULES
|
||||
)
|
||||
self.list.SetImageList(self.il, wxIMAGE_LIST_SMALL)
|
||||
|
||||
self.PopulateList()
|
||||
|
@@ -23,8 +23,8 @@ class TestToolBar(wxFrame):
|
||||
|
||||
self.CreateStatusBar()
|
||||
|
||||
#tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
|
||||
tb.AddLabelTool(10, "New", images.getNewBitmap(), shortHelp="New", longHelp="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)
|
||||
|
||||
@@ -47,9 +47,9 @@ class TestToolBar(wxFrame):
|
||||
shortHelp="Toggle this")
|
||||
EVT_TOOL(self, 50, self.OnToolClick)
|
||||
|
||||
#tb.AddCheckTool(60, '', images.getTog1Bitmap(), images.getTog2Bitmap(),
|
||||
# shortHelp="Toggle with 2 bitmaps")
|
||||
#EVT_TOOL(self, 60, self.OnToolClick)
|
||||
## tb.AddCheckTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(),
|
||||
## shortHelp="Toggle with 2 bitmaps")
|
||||
## EVT_TOOL(self, 60, self.OnToolClick)
|
||||
|
||||
EVT_TOOL_ENTER(self, -1, self.OnToolEnter)
|
||||
EVT_TOOL_RCLICKED(self, -1, self.OnToolRClick) # Match all
|
||||
@@ -110,16 +110,15 @@ def runTest(frame, nb, log):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys,os
|
||||
import run
|
||||
run.main(['', os.path.basename(sys.argv[0])])
|
||||
|
||||
|
Reference in New Issue
Block a user