My newbie adventure continues with a couple more question ...
I am using wxWidgets 2.8.12 on XP, and have been using the
documentation that comes with it, I have 2 x problems
1, In 2.8.12 how do I do a InsertStretchableSpace() to push a toolbar
button to the RHS, it seems a latter addition
2, Looking at the wxPython Demo code for Toolbar (and I must be a
little dense, it seems pretty confusing to me !), I see method calls
of ...
tb.AddLabelTool(20, "Open", open_bmp, shortHelp="Open", longHelp="Long
help for 'Open'")
tb.AddSimpleTool(30, copy_bmp, "Copy", "Long help for 'Copy'")
but can find nothing referencing them in the 2.8.12 documentation, any ideas ?
Many thanks
Dave
One of the most useful tricks is available to wxPython programmers,
but not to wxC programmers, and it is python itself, try doing the
following:
python
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit
(Intel)] on win
32
Type “help”, “copyright”, “credits” or “license” for more
information.
>>> import wx
>>> tb=wx.ToolBar
>>> dir(tb)
[‘AcceleratorTable’, ‘AcceptsFocus’, ‘AcceptsFocusFromKeyboard’,
‘AddCheckLabelT
ol’, ‘AddCheckTool’, ‘AddChild’, ‘AddControl’, ‘AddLabelTool’,
'AddPendingEvent
, ‘AddRadioLabelTool’, ‘AddRadioTool’, ‘AddSeparator’,
‘AddSimpleTool’, 'AddToo
‘, ‘AddToolItem’, ‘AdjustForLayoutDirection’, ‘Alignment’,
‘AssociateHandle’, ’
utoLayout’, ‘BackgroundColour’, ‘BackgroundStyle’, ‘BestSize’,
'BestVirtualSize
, ‘Bind’, ‘Border’, ‘CacheBestSize’, ‘CanSetTransparent’,
‘CaptureMouse’, * long list of all the methods and members
results* ]
>>> help (tb.AddSimpleTool)
Help on method AddSimpleTool in module wx._controls:
AddSimpleTool(self, id, bitmap, shortHelpString='',
longHelpString=‘’, isToggle=
0) unbound wx._controls.ToolBar method
Old style method to add a tool to the toolbar.
and so on, of course help(tb) shows the lot, one screen at a time.
Gadget/Steve
···
On 24/02/2012 4:29 PM, dave selby wrote: