guoguo wrote:
For example,
wx.Frame(parent, id=-1, title="", pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE,
name="frame")
for paremeter "pos", its value is given as wx.DefaultPosition, but if
I don't know wx.DefaultPosition at all in advance, which document can
help me to find all possible values for this "pos" ? same question
for "size", "style"
Seems to be a recurring theme, hopefully this will not get the documentation discussion started again .
In addition to Mike's tips:
Keep in mind that when you look at e.g. a wx.Frame you also need to go up the hierarchy for things like style, as a wx.Frame is inheriting some of them from wx.Window.
Using the Python prompt is something helpful, e.g. in the case of wx.DefaultPosition:
import wx
>>> wx.DefaultPosition
wx.Point(-1, -1)
Then you could look up wxPoint or wxFrame, I use Boa, so I would hit "ctrl-h" and type frame which gives me a large listing, selecting the second one which only shows "Frame" I get the class doc for wx.Frame in the new API format, which unfortunately is not very detailed, so I look at the "wxFrame" listing which is the C++ documentation and that gives me:
pos
The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.
BTW, you could also do "help (wx.Point)" at your Python prompt.
And the following is a repeat from a recent post on where to get information from:
One of the best tools to get going is the wxPython demo (a separate download with the docs).
Then there is the wiki
http://wiki.wxpython.org/How%20to%20Learn%20wxPython\\
http://wiki.wxpython.org/ObstacleCourse
I you might also want to invest into:
The wxPIA: wxPythonInAction - wxPyWiki
Sale of this book supports the project and I wish it had been around when I started using wxPython a few years ago.
Werner