Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49730 - /trunk/libyui-bindings/swig/python/examples/replacepoint.py
  • From: kkaempf@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 15:37:22 -0000
  • Message-id: <20080805153722.4380239CF6@xxxxxxxxxxxxxxxx>
Author: kkaempf
Date: Tue Aug 5 17:37:21 2008
New Revision: 49730

URL: http://svn.opensuse.org/viewcvs/yast?rev=49730&view=rev
Log:
example for replacepoints

Added:
trunk/libyui-bindings/swig/python/examples/replacepoint.py

Added: trunk/libyui-bindings/swig/python/examples/replacepoint.py
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/libyui-bindings/swig/python/examples/replacepoint.py?rev=49730&view=auto
==============================================================================
--- trunk/libyui-bindings/swig/python/examples/replacepoint.py (added)
+++ trunk/libyui-bindings/swig/python/examples/replacepoint.py Tue Aug 5
17:37:21 2008
@@ -0,0 +1,27 @@
+# coding=UTF-8
+#
+# Replacepoint, allows you to replace part of the widget tree
+#
+# Example by Jan-Simon Möller <dl9pf@xxxxxx>
+#
+
+import sys
+sys.path.insert(0,'../../../build/bindings/python')
+import yui
+
+factory = yui.YUI.widgetFactory()
+dialog = factory.createMainDialog()
+replacepoint = factory.createReplacePoint(dialog)
+hbox = factory.createHBox(replacepoint)
+b1 = factory.createPushButton(hbox, "1")
+b2 = factory.createPushButton(hbox, "2")
+b3 = factory.createPushButton(hbox, "3")
+event = dialog.waitForEvent() # push button
+replacepoint.deleteChildren()
+vbox = factory.createVBox(replacepoint)
+b1 = factory.createPushButton(vbox, "1")
+b2 = factory.createPushButton(vbox, "2")
+b3 = factory.createPushButton(vbox, "3")
+dialog.recalcLayout()
+replacepoint.showChild()
+event = dialog.waitForEvent() # tada!

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages