Added ability to use xml resource files. Still need to add ability to
subclass wxXmlResourceHandler, etc... Added wxGridAutoEditMixin to the mixins library package. Made ColourSelect be derived from wxButton. Fixed a few bugs here and there, added some missing methods, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,21 +34,22 @@ class TestColourSelect(wxPanel):
|
||||
self.y_pos = self.y_pos + delta
|
||||
|
||||
wxStaticText(self, -1, "Default", wxPoint(self.x_pos, self.y_pos), wxSize(-1, -1)) # name
|
||||
self.colour_def = ColourSelect(self, wxPoint(self.x_pos+100, self.y_pos)) # default colour selection control
|
||||
self.colour_def = ColourSelect(self, -1, pos=wxPoint(self.x_pos+100, self.y_pos)) # default colour selection control
|
||||
|
||||
self.y_pos = self.y_pos + delta
|
||||
colours = [[255, 255, 0], [255, 0, 255], [0, 255, 0], [0, 0, 255]] # list of initial colours for display
|
||||
self.names = names = [ "Default Size", "Another Size", "Another Colour", "Larger"] # display names
|
||||
sizes = [ None, wxSize(60, 20), None, wxSize(60, 60)] # button sizes
|
||||
sizes = [ wxDefaultSize, wxSize(60, 20), wxDefaultSize, wxSize(60, 60)] # button sizes
|
||||
self.set_val = []
|
||||
|
||||
for i in range(len(colours)):
|
||||
wxStaticText(self, -1, names[i], wxPoint(self.x_pos, self.y_pos), wxSize(-1, -1)) # name
|
||||
|
||||
val = ColourSelect(self, wxPoint(self.x_pos+100, self.y_pos), colours[i], sizes[i]) # colour selection button
|
||||
val = ColourSelect(self, -1, colours[i], wxPoint(self.x_pos+100, self.y_pos), sizes[i]) # colour selection button
|
||||
self.set_val.append(val) # store control for reference
|
||||
self.y_pos = self.y_pos + delta
|
||||
|
||||
|
||||
def OnClick(self, event):
|
||||
result = []
|
||||
colour = self.colour_def.GetColour() # default control value
|
||||
|
@@ -1,11 +1,13 @@
|
||||
from wxPython.wx import *
|
||||
from wxPython.grid import *
|
||||
from wxPython.lib.mixins.grid import wxGridAutoEditMixin
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class SimpleGrid(wxGrid):
|
||||
class SimpleGrid(wxGrid, wxGridAutoEditMixin):
|
||||
def __init__(self, parent, log):
|
||||
wxGrid.__init__(self, parent, -1)
|
||||
wxGridAutoEditMixin.__init__(self)
|
||||
self.log = log
|
||||
self.moveTo = None
|
||||
|
||||
@@ -25,6 +27,10 @@ class SimpleGrid(wxGrid):
|
||||
self.SetCellBackgroundColour(2, 2, wxCYAN)
|
||||
self.SetReadOnly(3, 3, true)
|
||||
|
||||
self.SetCellEditor(5, 0, wxGridCellNumberEditor())
|
||||
self.SetCellValue(5, 0, "123")
|
||||
self.SetCellEditor(6, 0, wxGridCellFloatEditor())
|
||||
self.SetCellValue(6, 0, "123.34")
|
||||
|
||||
# attribute objects let you keep a set of formatting values
|
||||
# in one spot, and reuse them if needed
|
||||
@@ -135,11 +141,12 @@ class SimpleGrid(wxGrid):
|
||||
if value == 'no good':
|
||||
self.moveTo = evt.GetRow(), evt.GetCol()
|
||||
|
||||
|
||||
def OnIdle(self, evt):
|
||||
if self.moveTo != None:
|
||||
self.SetGridCursor(self.moveTo[0], self.moveTo[1])
|
||||
self.moveTo = None
|
||||
|
||||
evt.Skip()
|
||||
|
||||
|
||||
def OnSelectCell(self, evt):
|
||||
@@ -155,9 +162,7 @@ class SimpleGrid(wxGrid):
|
||||
value = self.GetCellValue(row, col)
|
||||
if value == 'no good 2':
|
||||
return # cancels the cell selection
|
||||
else:
|
||||
evt.Skip()
|
||||
|
||||
evt.Skip()
|
||||
|
||||
|
||||
def OnEditorShown(self, evt):
|
||||
|
@@ -22,9 +22,7 @@ import images
|
||||
|
||||
|
||||
_treeList = [
|
||||
('New since last release', ['ColourSelect', 'ImageBrowser', 'infoframe',
|
||||
'ColourDB', 'wxToggleButton', 'OOR', 'wxWave',
|
||||
'wxJoystick',
|
||||
('New since last release', ['wxTextCtrl', 'XML_Resource'
|
||||
]),
|
||||
|
||||
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
|
||||
@@ -63,6 +61,7 @@ _treeList = [
|
||||
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
|
||||
'FileBrowseButton', 'GenericButtons', 'wxEditor',
|
||||
'PyShellWindow', 'ColourSelect', 'ImageBrowser',
|
||||
'infoframe', 'ColourDB',
|
||||
]),
|
||||
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
||||
@@ -112,6 +111,9 @@ class wxPythonDemo(wxFrame):
|
||||
splitter = wxSplitterWindow(self, -1, style=wxNO_3D|wxSP_3D)
|
||||
splitter2 = wxSplitterWindow(splitter, -1, style=wxNO_3D|wxSP_3D)
|
||||
|
||||
def EmptyHandler(evt): pass
|
||||
EVT_ERASE_BACKGROUND(splitter, EmptyHandler)
|
||||
EVT_ERASE_BACKGROUND(splitter2, EmptyHandler)
|
||||
|
||||
# Prevent TreeCtrl from displaying all items after destruction
|
||||
self.dying = false
|
||||
@@ -176,7 +178,7 @@ class wxPythonDemo(wxFrame):
|
||||
EVT_LEFT_DOWN (self.tree, self.OnTreeLeftDown)
|
||||
|
||||
# Create a Notebook
|
||||
self.nb = wxNotebook(splitter2, -1)
|
||||
self.nb = wxNotebook(splitter2, -1, style=wxCLIP_CHILDREN)
|
||||
|
||||
# Set up a wxHtmlWindow on the Overview Notebook page
|
||||
# we put it in a panel first because there seems to be a
|
||||
@@ -187,7 +189,7 @@ class wxPythonDemo(wxFrame):
|
||||
self.nb.AddPage(self.ovr, "Overview")
|
||||
|
||||
else: # hopefully I can remove this hacky code soon, see bug #216861
|
||||
panel = wxPanel(self.nb, -1)
|
||||
panel = wxPanel(self.nb, -1, style=wxCLIP_CHILDREN)
|
||||
self.ovr = wxHtmlWindow(panel, -1, size=(400, 400))
|
||||
self.nb.AddPage(panel, "Overview")
|
||||
|
||||
@@ -195,6 +197,8 @@ class wxPythonDemo(wxFrame):
|
||||
ovr.SetSize(evt.GetSize())
|
||||
|
||||
EVT_SIZE(panel, OnOvrSize)
|
||||
EVT_ERASE_BACKGROUND(panel, EmptyHandler)
|
||||
|
||||
|
||||
self.SetOverview("Overview", overview)
|
||||
|
||||
@@ -470,7 +474,7 @@ class MyApp(wxApp):
|
||||
|
||||
def main():
|
||||
try:
|
||||
demoPath = os.path.split(__file__)[0]
|
||||
demoPath = os.path.dirname(__file__)
|
||||
os.chdir(demoPath)
|
||||
except:
|
||||
pass
|
||||
|
@@ -4,7 +4,7 @@ import sys
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
myEVT_BUTTON_CLICKPOS = 5015
|
||||
myEVT_BUTTON_CLICKPOS = wxNewEventType()
|
||||
|
||||
def EVT_BUTTON_CLICKPOS(win, id, func):
|
||||
win.Connect(id, -1, myEVT_BUTTON_CLICKPOS, func)
|
||||
|
49
wxPython/demo/XML_Resource.py
Normal file
49
wxPython/demo/XML_Resource.py
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.xrc import *
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
RESFILE = "data/resource_wdr.xrc"
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
|
||||
# make the components
|
||||
label = wxStaticText(self, -1, "The lower panel was built from this XML:")
|
||||
label.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD))
|
||||
|
||||
text = wxTextCtrl(self, -1, open(RESFILE).read(),
|
||||
style=wxTE_READONLY|wxTE_MULTILINE)
|
||||
text.SetInsertionPoint(0)
|
||||
|
||||
line = wxStaticLine(self, -1)
|
||||
|
||||
res = wxXmlResource(RESFILE)
|
||||
panel = res.LoadPanel(self, "MyPanel")
|
||||
|
||||
# and do the layout
|
||||
sizer = wxBoxSizer(wxVERTICAL)
|
||||
sizer.Add(label, 0, wxEXPAND|wxTOP|wxLEFT, 5)
|
||||
sizer.Add(text, 1, wxEXPAND|wxALL, 5)
|
||||
sizer.Add(line, 0, wxEXPAND)
|
||||
sizer.Add(panel, 1, wxEXPAND|wxALL, 5)
|
||||
|
||||
self.SetSizer(sizer)
|
||||
self.SetAutoLayout(true)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
overview = """
|
||||
"""
|
BIN
wxPython/demo/data/resource.wdr
Normal file
BIN
wxPython/demo/data/resource.wdr
Normal file
Binary file not shown.
153
wxPython/demo/data/resource_wdr.xrc
Normal file
153
wxPython/demo/data/resource_wdr.xrc
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- XML resource generated by wxDesigner from file: resource.wdr -->
|
||||
<!-- Do not modify this file, all changes will be lost! -->
|
||||
|
||||
<resource>
|
||||
|
||||
<object class="wxPanel" name="MyPanel">
|
||||
<object class="wxFlexGridSizer">
|
||||
<cols>2</cols>
|
||||
<rows>0</rows>
|
||||
<vgap>0</vgap>
|
||||
<hgap>0</hgap>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="ID_TEXT">
|
||||
<label>Name:</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_NameField">
|
||||
<size>80,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="ID_TEXT">
|
||||
<label>Address:</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_Addr1Field">
|
||||
<size>80,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="spacer">
|
||||
<flag>wxALIGN_CENTRE</flag>
|
||||
<border>5</border>
|
||||
<size>20,20</size>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_TEXTCTRL">
|
||||
<size>80,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="ID_TEXT">
|
||||
<label>City, State, Zip:</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxBoxSizer">
|
||||
<orient>wxHORIZONTAL</orient>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxLEFT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_CityField">
|
||||
<size>100,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxLEFT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_StateField">
|
||||
<size>30,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_ZipField">
|
||||
<size>50,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="ID_TEXT">
|
||||
<label>Phone:</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_PhoneField">
|
||||
<size>80,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="ID_TEXT">
|
||||
<label>Email:</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag>
|
||||
<border>5</border>
|
||||
<object class="wxTextCtrl" name="ID_EmailField">
|
||||
<size>80,-1</size>
|
||||
<value></value>
|
||||
</object>
|
||||
</object>
|
||||
<object class="spacer">
|
||||
<flag>wxALIGN_CENTRE|wxALL</flag>
|
||||
<border>5</border>
|
||||
<size>20,20</size>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALIGN_CENTER_VERTICAL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxBoxSizer">
|
||||
<orient>wxHORIZONTAL</orient>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxALL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxButton" name="wxID_OK">
|
||||
<label>Save</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxALL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxButton" name="wxID_CANCEL">
|
||||
<label>Cancel</label>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
</resource>
|
@@ -90,7 +90,7 @@ class MyApp(wxApp):
|
||||
|
||||
# This inner loop will process any GUI events until there
|
||||
# are no more waiting.
|
||||
while self.Pending():
|
||||
while self.Pending():
|
||||
self.Dispatch()
|
||||
|
||||
# Send idle events to idle handlers. You may want to throtle
|
||||
|
@@ -44,7 +44,7 @@ command_lines = [
|
||||
"-a -n Tog1 -m #C0C0C0 bmp_source/tog1.bmp images.py",
|
||||
"-a -n Tog2 -m #C0C0C0 bmp_source/tog2.bmp images.py",
|
||||
|
||||
"-a -n Smiles bmp_source/smiles.bmp images.py",
|
||||
"-a -n Smiles -m #FFFFFF bmp_source/smiles.bmp images.py",
|
||||
|
||||
"-a -n GridBG bmp_source/GridBG.gif images.py",
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -15,12 +15,15 @@ class TestChoice(wxPanel):
|
||||
wxPoint(15, 10))
|
||||
|
||||
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 20))
|
||||
wxChoice(self, 40, (80, 50), (95, 125),
|
||||
self.ch = wxChoice(self, 40, (80, 50), (95, 125),
|
||||
choices = sampleList)
|
||||
EVT_CHOICE(self, 40, self.EvtChoice)
|
||||
|
||||
|
||||
def EvtChoice(self, event):
|
||||
self.log.WriteText('EvtChoice: %s\n' % event.GetString())
|
||||
self.ch.Append("A new item")
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
@@ -68,7 +68,8 @@ class TestListCtrlPanel(wxPanel):
|
||||
|
||||
self.il = wxImageList(16, 16)
|
||||
bmp = images.getSmilesBitmap()
|
||||
idx1 = self.il.AddWithColourMask(bmp, wxWHITE)
|
||||
#idx1 = self.il.AddWithColourMask(bmp, wxWHITE)
|
||||
idx1 = self.il.Add(bmp)
|
||||
|
||||
self.list = wxListCtrl(self, tID,
|
||||
style=wxLC_REPORT|wxSUNKEN_BORDER)
|
||||
@@ -143,7 +144,6 @@ class TestListCtrlPanel(wxPanel):
|
||||
# this does
|
||||
self.list.SetItemState(10, 0, wxLIST_STATE_SELECTED)
|
||||
|
||||
|
||||
def OnItemActivated(self, event):
|
||||
self.currentItem = event.m_itemIndex
|
||||
self.log.WriteText("OnItemActivated: %s\n" % self.list.GetItemText(self.currentItem))
|
||||
@@ -176,7 +176,10 @@ class TestListCtrlPanel(wxPanel):
|
||||
tPopupID3 = 2
|
||||
tPopupID4 = 3
|
||||
tPopupID5 = 5
|
||||
menu.Append(tPopupID1, "One")
|
||||
#menu.Append(tPopupID1, "One")
|
||||
item = wxMenuItem(menu, tPopupID1,"One")
|
||||
item.SetBitmap(images.getSmilesBitmap())
|
||||
menu.AppendItem(item)
|
||||
menu.Append(tPopupID2, "Two")
|
||||
menu.Append(tPopupID3, "Three")
|
||||
menu.Append(tPopupID4, "DeleteAllItems")
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
||||
import sys
|
||||
from wxPython.wx import *
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -8,23 +8,48 @@ class TestPanel(wxPanel):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
|
||||
wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20))
|
||||
t = wxTextCtrl(self, 10, "Test it out and see", wxPoint(80, 25), wxSize(150, 20))
|
||||
t.SetInsertionPoint(0)
|
||||
l1 = wxStaticText(self, -1, "wxTextCtrl")
|
||||
t1 = wxTextCtrl(self, 10, "Test it out and see", size=(125, -1))
|
||||
t1.SetInsertionPoint(0)
|
||||
EVT_TEXT(self, 10, self.EvtText)
|
||||
EVT_CHAR(t, self.EvtChar)
|
||||
EVT_CHAR(t1, self.EvtChar)
|
||||
|
||||
|
||||
wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20))
|
||||
wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD)
|
||||
l2 = wxStaticText(self, -1, "Passsword")
|
||||
t2 = wxTextCtrl(self, 20, "", size=(125, -1), style=wxTE_PASSWORD)
|
||||
EVT_TEXT(self, 20, self.EvtText)
|
||||
|
||||
wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20))
|
||||
t = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control",
|
||||
wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE)
|
||||
t.SetInsertionPoint(0)
|
||||
l3 = wxStaticText(self, -1, "Multi-line")
|
||||
t3 = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control",
|
||||
size=(200, 100), style=wxTE_MULTILINE)
|
||||
t3.SetInsertionPoint(0)
|
||||
EVT_TEXT(self, 30, self.EvtText)
|
||||
|
||||
l4 = wxStaticText(self, -1, "Rich Text")
|
||||
t4 = wxTextCtrl(self, 40, "If supported by the native control, this is red, and this is a different font.",
|
||||
size=(200, 100), style=wxTE_MULTILINE|wxTE_RICH)
|
||||
t4.SetInsertionPoint(0)
|
||||
t4.SetStyle(44, 47, wxTextAttr("RED", "YELLOW"))
|
||||
|
||||
points = t4.GetFont().GetPointSize() # get the current size
|
||||
f = wxFont(points+2, wxROMAN, wxITALIC, wxBOLD, true)
|
||||
## print 'a1', sys.getrefcount(f)
|
||||
## t4.SetStyle(63, 77, wxTextAttr("BLUE", font=f))
|
||||
t4.SetStyle(63, 77, wxTextAttr("BLUE", wxNullColour, f))
|
||||
## print 'a2', sys.getrefcount(f)
|
||||
|
||||
sizer = wxFlexGridSizer(cols=2, hgap=6, vgap=6)
|
||||
sizer.AddMany([ l1, t1,
|
||||
l2, t2,
|
||||
l3, t3,
|
||||
l4, t4,
|
||||
])
|
||||
border = wxBoxSizer(wxVERTICAL)
|
||||
border.Add(sizer, 0, wxALL, 25)
|
||||
self.SetSizer(border)
|
||||
self.SetAutoLayout(true)
|
||||
|
||||
|
||||
def EvtText(self, event):
|
||||
self.log.WriteText('EvtText: %s\n' % event.GetString())
|
||||
|
||||
|
@@ -16,6 +16,7 @@ class TestToolBar(wxFrame):
|
||||
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
|
||||
|
||||
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT)
|
||||
# wxTB_VERTICAL
|
||||
#tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize,
|
||||
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
||||
#self.SetToolBar(tb)
|
||||
|
Reference in New Issue
Block a user