mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Add some code snippets for the docs
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
|
||||
# Create the initially empty label with the size big enough to show
|
||||
# the given string.
|
||||
dc = wx.ClientDC(self)
|
||||
text = wx.StaticText(
|
||||
self,
|
||||
size=dc.GetTextExtent("String of max length"),
|
||||
style=wx.ST_NO_AUTORESIZE
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
# Including headers is not required for Python.
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
# For Python the returned GridBlocks object has a __iter__ method so iterating
|
||||
# in the Python way is possible.
|
||||
for block in self.grid.GetSelectedBlocks():
|
||||
do_something(block)
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
# For Python the returned GridBlocks object has a __iter__ method so iterating
|
||||
# in the Python way is possible.
|
||||
for block in self.grid.GetSelectedBlocks():
|
||||
do_something(block)
|
||||
Reference in New Issue
Block a user