Bug fixes, new tests and demos, new generated source...

Added FileBrowseButton class to the library


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-11-25 07:08:14 +00:00
parent 899493dd61
commit 694759cfeb
33 changed files with 518 additions and 127 deletions

View File

@@ -8,8 +8,6 @@ class ClipTextPanel(wxPanel):
wxPanel.__init__(self, parent, -1)
self.log = log
self.do = wxTextDataObject()
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
sizer = wxBoxSizer(wxVERTICAL)
@@ -35,6 +33,7 @@ class ClipTextPanel(wxPanel):
def OnCopy(self, evt):
self.do = wxTextDataObject()
self.do.SetText(self.text.GetValue())
wxTheClipboard.Open()
wxTheClipboard.SetData(self.do)
@@ -42,11 +41,12 @@ class ClipTextPanel(wxPanel):
def OnPaste(self, evt):
do = wxTextDataObject()
wxTheClipboard.Open()
success = wxTheClipboard.GetData(self.do)
success = wxTheClipboard.GetData(do)
wxTheClipboard.Close()
if success:
self.text.SetValue(self.do.GetText())
self.text.SetValue(do.GetText())
else:
wxMessageBox("There is no data in the clipboard in the required format",
"Error")

View File

@@ -0,0 +1,19 @@
from wxPython.wx import *
from wxPython.lib.filebrowsebtn import FileBrowseButton
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = wxPanel(nb, -1)
fbb = FileBrowseButton(win, -1, wxPoint(20,20), wxSize(350, -1))
return win
#----------------------------------------------------------------------
overview = FileBrowseButton.__doc__

View File

@@ -21,7 +21,8 @@ _useSplitter = true
_useNestedSplitter = true
_treeList = [
('New since last release', ['wxMVCTree', 'wxVTKRenderWindow']),
('New since last release', ['wxMVCTree', 'wxVTKRenderWindow',
'FileBrowseButton']),
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
@@ -49,7 +50,8 @@ _treeList = [
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow']),
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
'FileBrowseButton',]),
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
@@ -61,6 +63,8 @@ class wxPythonDemo(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, -1, title, size = (725, 550))
self.cwd = os.getcwd()
if wxPlatform == '__WXMSW__':
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
self.SetIcon(self.icon)
@@ -238,6 +242,7 @@ class wxPythonDemo(wxFrame):
#---------------------------------------------
def RunDemo(self, itemText):
os.chdir(self.cwd)
if self.nb.GetPageCount() == 3:
if self.nb.GetSelection() == 2:
self.nb.SetSelection(0)

View File

@@ -23,7 +23,7 @@ class TestListCtrlPanel(wxPanel):
tID = NewId()
self.il = wxImageList(16, 16)
idx1 = self.il.Add(wxNoRefBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
idx1 = self.il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
wxLC_REPORT|wxSUNKEN_BORDER)