当前位置: 首页>>代码示例>>Python>>正文


Python wx.STAY_ON_TOP属性代码示例

本文整理汇总了Python中wx.STAY_ON_TOP属性的典型用法代码示例。如果您正苦于以下问题:Python wx.STAY_ON_TOP属性的具体用法?Python wx.STAY_ON_TOP怎么用?Python wx.STAY_ON_TOP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.STAY_ON_TOP属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: pin_design_window

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def pin_design_window(self):
        common.pin_design_window = not common.pin_design_window
        if common.pin_design_window != self._t_pin_design_window.IsToggled():
            self._t_pin_design_window.Toggle()
            self.toolbar.Realize()
        self._m_pin_design_window.Check(common.pin_design_window)

        toplevel = self._get_toplevel()
        if not toplevel or not toplevel.widget: return
        frame = toplevel.widget.GetTopLevelParent()
        if not isinstance(frame, wx.Frame): return
        style = frame.GetWindowStyle()
        if common.pin_design_window:
            frame.SetWindowStyle( style | wx.STAY_ON_TOP)
        elif style & wx.STAY_ON_TOP:
            frame.ToggleWindowStyle(wx.STAY_ON_TOP)
            if wx.Platform=='__WXMSW__':
                frame.Iconize(True)
                frame.Iconize(False)
            else:
                toplevel.widget.Raise() 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:23,代码来源:main.py

示例2: create_widget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def create_widget(self):
        if self.parent:
            parent = self.parent.widget
        else:
            parent = common.main

        # we set always a default style because this is the best one for editing the dialog
        # (for example, a dialog without a caption would be hard to move, etc.)
        default_style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        if common.pin_design_window: default_style |= wx.STAY_ON_TOP

        # change 2002-10-09: now we create a wxFrame instead of a wxDialog,
        # because the latter gives troubles I wasn't able to solve when using wxPython 2.3.3.1 :-/
        self.widget = wx.Frame(parent, self.id, "", style=default_style)
        self.widget.SetBackgroundColour(compat.wx_SystemSettings_GetColour(wx.SYS_COLOUR_BTNFACE))
        self._set_widget_icon() 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:18,代码来源:dialog.py

示例3: create_widget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def create_widget(self):
        if self.widget:
            # re-creating -> use old frame
            win = self.widget.GetTopLevelParent()
        else:
            style = wx.DEFAULT_FRAME_STYLE
            if common.pin_design_window: style |= wx.STAY_ON_TOP
            win = wx.Frame( common.main, -1, misc.design_title(self.name), size=(400, 300), style=style )
            import os, compat
            icon = compat.wx_EmptyIcon()
            xpm = os.path.join(config.icons_path, 'panel.xpm')
            icon.CopyFromBitmap(misc.get_xpm_bitmap(xpm))
            win.SetIcon(icon)
            win.Bind(wx.EVT_CLOSE, self.hide_widget)  # CLOSE event of the frame, not the panel
            if wx.Platform == '__WXMSW__':
                win.CentreOnScreen()

        if self.scrollable:
            self.widget = wx.ScrolledWindow(win, self.id, style=0)
        else:
            self.widget = wx.Panel(win, self.id, style=0)
        self.widget.Bind(wx.EVT_ENTER_WINDOW, self.on_enter)
        self.widget.GetBestSize = self.get_widget_best_size
        #self.widget.SetSize = win.SetSize 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:26,代码来源:panel.py

示例4: CheckAddOnFiles

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def CheckAddOnFiles(self):
        neededFiles = self.GetNeededFiles()
        if len(neededFiles) == 0:
            return True
        if not eg.CallWait(self.ShowDownloadMessage):
            return False
        stopEvent = threading.Event()
        wx.CallAfter(eg.TransferDialog, None, neededFiles, stopEvent)
        stopEvent.wait()
        neededFiles = self.GetNeededFiles()
        if neededFiles:
            eg.CallWait(
                wx.MessageBox,
                Text.downloadFailedMsg,
                caption=Text.dialogCaption % self.plugin.name,
                style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP,
                parent=eg.document.frame
            )
            return False
        return True 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:22,代码来源:WinUsb.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, parent):
        wx.Frame.__init__(
            self,
            parent,
            -1,
            "OSD Window",
            size=(0, 0),
            style=(
                wx.FRAME_SHAPED |
                wx.NO_BORDER |
                wx.FRAME_NO_TASKBAR |
                wx.STAY_ON_TOP
            )
        )
        self.hwnd = self.GetHandle()
        self.bitmap = wx.EmptyBitmap(0, 0)
        # we need a timer to possibly cancel it
        self.timer = threading.Timer(0.0, eg.DummyFunc)
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Bind(wx.EVT_CLOSE, self.OnClose) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:22,代码来源:ShowOSD.py

示例6: ShowHidMessage

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def ShowHidMessage(self, disableHid):
        """
        Informs the user, that the system needs to restart the system to let
        the HID registry changes take effect.
        """
        try:
            self.SetHidState(disableHid)
        except WindowsError:
            dialog = wx.MessageDialog(
                None,
                self.text.hidErrorMessage,
                self.text.hidDialogCaption,
                wx.OK|wx.ICON_ERROR|wx.STAY_ON_TOP
            )
        else:
            dialog = wx.MessageDialog(
                None,
                self.text.hidDialogMessage,
                self.text.hidDialogCaption,
                wx.OK|wx.ICON_INFORMATION|wx.STAY_ON_TOP
            )
        dialog.ShowModal()
        dialog.Destroy() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:25,代码来源:__init__.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, size=(-1, -1), pic_path=None, display=0):
        wx.Frame.__init__(
            self,
            None,
            -1,
            "ShowPictureFrame",
            style=wx.NO_BORDER | wx.FRAME_NO_TASKBAR  #| wx.STAY_ON_TOP
        )
        self.SetBackgroundColour(wx.Colour(0, 0, 0))
        self.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
        self.Bind(wx.EVT_CLOSE, self.OnClose)
        bitmap = wx.EmptyBitmap(1, 1)
        self.staticBitmap = wx.StaticBitmap(self, -1, bitmap)
        self.staticBitmap.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
        self.staticBitmap.Bind(wx.EVT_MOTION, self.ShowCursor)
        self.timer = Timer(2.0, self.HideCursor) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:18,代码来源:__init__.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: Terminal.__init__
        kwds["style"] = kwds.get("style",
                                 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_TASKBAR | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
        wx.Frame.__init__(self, *args, **kwds)
        Module.__init__(self)
        self.SetSize((915, 424))
        self.text_main = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY)
        self.text_entry = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT_ENTER, self.on_entry, self.text_entry)
        # end wxGlade
        self.Bind(wx.EVT_CLOSE, self.on_close, self)
        self.pipe = None 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:19,代码来源:UsbConnect.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: JobSpooler.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
        wx.Frame.__init__(self, *args, **kwds)
        Module.__init__(self)
        self.SetSize((661, 402))
        self.list_job_spool = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.list_job_spool)
        self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_item_rightclick, self.list_job_spool)
        # end wxGlade
        self.dirty = False
        self.update_buffer_size = False
        self.update_spooler_state = False
        self.update_spooler = False

        self.elements_progress = 0
        self.elements_progress_total = 0
        self.command_index = 0
        self.listener_list = None
        self.list_lookup = {}
        self.Bind(wx.EVT_CLOSE, self.on_close, self) 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:27,代码来源:JobSpooler.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: Keymap.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
        wx.Frame.__init__(self, *args, **kwds)
        Module.__init__(self)
        self.SetSize((500, 530))
        self.list_keymap = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
        self.button_add = wx.Button(self, wx.ID_ANY, _("Add Hotkey"))
        self.text_key_name = wx.TextCtrl(self, wx.ID_ANY, "")
        self.text_command_name = wx.TextCtrl(self, wx.ID_ANY, "")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_button_add_hotkey, self.button_add)
        # end wxGlade
        self.Bind(wx.EVT_CLOSE, self.on_close, self)
        self.text_key_name.Bind(wx.EVT_KEY_DOWN, self.on_key_press)
        self.SetFocus() 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:21,代码来源:Keymap.py

示例11: Always_on_top

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def Always_on_top(self, e):
            if self.menu_view_t.IsChecked():
                self.SetWindowStyle(self.GetWindowStyle() | wx.STAY_ON_TOP)
                for i in self.children:
                    i.SetWindowStyle(i.GetWindowStyle() | wx.STAY_ON_TOP)
            else:
                self.SetWindowStyle(self.GetWindowStyle() & ~wx.STAY_ON_TOP)
                for i in self.children:
                    i.SetWindowStyle(i.GetWindowStyle() & ~wx.STAY_ON_TOP) 
开发者ID:hvqzao,项目名称:report-ng,代码行数:11,代码来源:gui.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def __init__(self, parent=None, title='', content=None, size=(800, 600,), *args, **kwargs):
            YamledWindow.__init__(self, parent, title=title, content=content, size=size, *args, **kwargs)
            if parent is not None:
                parent.children += [self]
                if parent.menu_view_t.IsChecked():
                    self.SetWindowStyle(self.GetWindowStyle() | wx.STAY_ON_TOP)
            #self.Bind(wx.EVT_CLOSE, lambda x: self.Destroy()) 
开发者ID:hvqzao,项目名称:report-ng,代码行数:9,代码来源:gui.py

示例13: on_error

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def on_error(self, errmsg, exit = False):
        if self.bgapp is None:
            title = 'Error'
        else:
            title = self.bgapp.appname + ' Error'
        dlg = wx.MessageDialog(None, errmsg, title, wx.OK | wx.ICON_ERROR | wx.STAY_ON_TOP)
        result = dlg.ShowModal()
        dlg.Destroy()
        if exit:
            self.ExitMainLoop() 
开发者ID:alesnav,项目名称:p2ptv-pi,代码行数:12,代码来源:EngineWx.py

示例14: always_on_top

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def always_on_top(self, event):
        """Toggle the always on top setting."""
        current_value = settings.CONFIG['DEFAULT']['Always On Top']
        style = self.main_dialog.GetWindowStyle()
        self.main_dialog.SetWindowStyle(style ^ wx.STAY_ON_TOP)
        settings.CONFIG['DEFAULT']['Always On Top'] = str(not current_value) 
开发者ID:RMPR,项目名称:atbswp,代码行数:8,代码来源:control.py

示例15: disable_stay_on_top

# 需要导入模块: import wx [as 别名]
# 或者: from wx import STAY_ON_TOP [as 别名]
def disable_stay_on_top(widget):
        # used like 'with parent and parent.frozen() or dummy_contextmanager()
        restore = False
        tl = get_toplevel_parent(widget)
        if isinstance(tl, wx.Frame) and tl.GetWindowStyle() & wx.STAY_ON_TOP:
            tl.ToggleWindowStyle(wx.STAY_ON_TOP)
            restore = True
        yield
        if restore:
            tl.ToggleWindowStyle(wx.STAY_ON_TOP) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:12,代码来源:misc.py


注:本文中的wx.STAY_ON_TOP属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。