]> git.saurik.com Git - wxWidgets.git/commitdiff
make the stay-on-top mode controlled by a command-line parameter
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Feb 2006 22:15:24 +0000 (22:15 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Feb 2006 22:15:24 +0000 (22:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/misc/wxprojview.py

index 81abde5c1a34f26022a5efb5551fe6fc9d546793..d53a9904859c51e8f186d11d37490dc294fead18 100755 (executable)
 import wx
 import wx.lib.stattext as st
 import os
+import sys
 
 class MyFrame(wx.Frame):
-    def __init__(self):
+    def __init__(self, style=0):
         wx.Frame.__init__(self, None, title="wx Active Project",
-                          style=wx.FRAME_NO_TASKBAR|wx.STAY_ON_TOP,
-                          name="wxprojview"
+                          style=wx.FRAME_NO_TASKBAR | style
+                          ,name="wxprojview"
                           )
-        p = wx.Panel(self)#, style=wx.SIMPLE_BORDER)
+        p = wx.Panel(self)
         
         p.SetBackgroundColour("sky blue")
         self.label = st.GenStaticText(p, -1, "wx XXX")
@@ -104,6 +105,9 @@ class MyFrame(wx.Frame):
 app = wx.PySimpleApp()
 app.SetAppName("wxprojview")
 app.SetVendorName("Robin Dunn")
-frm = MyFrame()
+style = wx.STAY_ON_TOP
+if len(sys.argv) > 1 and sys.argv[1] == 'nostayontop':
+    style=0
+frm = MyFrame(style)
 frm.Show()
 app.MainLoop()