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


Python wx.MINIMIZE_BOX属性代码示例

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


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

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self):
        wx.Frame.__init__(self, None,
                          pos=wx.DefaultPosition, size=wx.Size(450, 100),
                          style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION |
                          wx.CLOSE_BOX | wx.CLIP_CHILDREN,
                          title="BRUNO")
        panel = wx.Panel(self)

        ico = wx.Icon('boy.ico', wx.BITMAP_TYPE_ICO)
        self.SetIcon(ico)

        my_sizer = wx.BoxSizer(wx.VERTICAL)
        lbl = wx.StaticText(panel,
                            label="Bienvenido Sir. How can I help you?")
        my_sizer.Add(lbl, 0, wx.ALL, 5)
        self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER,
                               size=(400, 30))
        self.txt.SetFocus()
        self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
        my_sizer.Add(self.txt, 0, wx.ALL, 5)
        panel.SetSizer(my_sizer)
        self.Show()
        speak.Speak('''Welcome back Sir, Broono at your service.''') 
开发者ID:ab-anand,项目名称:Bruno,代码行数:25,代码来源:daily.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self, parent, id, title, size):
        wx.Frame.__init__(self, parent, id, title,
                          style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MINIMIZE_BOX |
                                                          wx.MAXIMIZE_BOX))
        self.SetSize(size)
        self.Center()
        self.ps = wx.StaticText(self, label='IF part using \'AND\' to combine antecedent. Please ONE antecedent per line',
                                pos=(10, 5), size=(40 ,100))
        self.ifLabel = wx.StaticText(self, label='IF: ', pos=(10, 30), size=(40, 50))
        self.thenLabel = wx.StaticText(self, label='THEN: ', pos=(10, 250), size=(40, 50))
        self.descriptionLabel = wx.StaticText(self, label='Description: ', pos=(10, 280), size=(40, 50))
        self.ifText = wx.TextCtrl(self, pos=(100, 30), size=(490, 210), style=wx.TE_MULTILINE)
        self.thenText = wx.TextCtrl(self, pos=(100, 250), size=(490, 25))
        self.descriptionText = wx.TextCtrl(self, pos=(100, 280), size=(490, 25))
        self.createButton = wx.Button(self, label='Create', pos=(85, 320), size=(130, 30))
        self.createButton.Bind(wx.EVT_BUTTON, self.create_rule)
        self.cancelButton = wx.Button(self, label='Cancel', pos=(385, 320), size=(130, 30))
        self.cancelButton.Bind(wx.EVT_BUTTON, self.cancel_creation) 
开发者ID:Sorosliu1029,项目名称:Rule-based_Expert_System,代码行数:20,代码来源:rule_editor.py

示例3: SetWindowStyleFlag

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def SetWindowStyleFlag(self, *args, **kwargs):
        """
        Changes the main frame style depending on the display of the tray icon.

        Sets the style flags for the minimize button. It will be grayed out if
        the tray icon is shown and there child dialogs open.
        If the tray icon is not shown the minimize button will function as
        usual.

        :param args: unused, kept for compatibility with
        wxFrame.SetWindowStyleFlag()
        :param kwargs: unused, kept for compatibility with
        wxFrame.SetWindowStyleFlag()
        :return: None
        """
        if eg.config.showTrayIcon:
            if len(self.openDialogs):
                style = ~(wx.MINIMIZE_BOX | wx.CLOSE_BOX) & self.style
            else:
                style = self.style
        else:
            style = self.style

        wx.Frame.SetWindowStyleFlag(self, style) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:26,代码来源:__init__.py

示例4: OnShowSettings

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def OnShowSettings(self, event):
        if self.settings_frame is None:
            frame_rect = self.GetRect()
            display_rect = wx.GetClientDisplayRect()
            x_start = frame_rect[0] + frame_rect[2]
            if x_start > (display_rect[2] - 400):
                x_start = display_rect[2] - 400
            y_start = frame_rect[1]
            self.settings_frame = SettingsFrame(
                self,
                -1,
                "Settings",
                style=wx.CAPTION | wx.MINIMIZE_BOX | wx.CLOSE_BOX | wx.SYSTEM_MENU,
                pos=(x_start, y_start),
            )
        self.settings_frame.Show() 
开发者ID:dials,项目名称:dials,代码行数:18,代码来源:rstbx_frame.py

示例5: OnShowSettings

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def OnShowSettings(self, event):
        if self.settings_frame is None:
            frame_rect = self.GetRect()
            display_rect = wx.GetClientDisplayRect()
            x_start = frame_rect[0] + frame_rect[2]
            if x_start > (display_rect[2] - 400):
                x_start = display_rect[2] - 400
            y_start = frame_rect[1]
            self.settings_frame = SpotSettingsFrame(
                self,
                -1,
                "Settings",
                style=wx.CAPTION | wx.MINIMIZE_BOX,
                pos=(x_start, y_start),
            )
        self.settings_frame.Show() 
开发者ID:dials,项目名称:dials,代码行数:18,代码来源:spotfinder_frame.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self, parent, title="Color Recognizer 2"):
            wx.Frame.__init__(self, parent, size=(800, 600), style=wx.DEFAULT_DIALOG_STYLE | wx.MINIMIZE_BOX)        
            self.imgSizer = (800, 600)
            self.pnl = wx.Panel(self)
            self.vbox = wx.BoxSizer(wx.VERTICAL)
            self.image = wx.Image(self.imgSizer[0],self.imgSizer[1])
            self.imageBit = wx.Bitmap(self.image)
            self.staticBit = wx.StaticBitmap(self.pnl, wx.ID_ANY, self.imageBit)

            self.vbox.Add(self.staticBit)

            self.capture = cv2.VideoCapture(0)
            ret, self.frame = self.capture.read()
            if ret:
                self.height, self.width = self.frame.shape[:2]
                self.bmp = wx.Bitmap.FromBuffer(self.width, self.height, self.frame)
                self.timex = wx.Timer(self)
                self.timex.Start(1000./24)
                self.Bind(wx.EVT_TIMER, self.redraw)
                self.SetSize(self.imgSizer)
            else:
                print("Error no webcam image")
            self.pnl.SetSizer(self.vbox)
            self.vbox.Fit(self)

             # Create buttons
            btn_black = wx.Button(self, -1, "Black", pos=(10,20))
            btn_white = wx.Button(self, -1, "White", pos=(110,20))
            btn_red = wx.Button(self, -1, "Red", pos=(210,20))
            btn_green = wx.Button(self, -1, "Green", pos=(310,20))
            btn_blue = wx.Button(self, -1, "Blue", pos=(410,20))
            btn_orange = wx.Button(self, -1, "Orange", pos=(510,20))
            btn_yellow = wx.Button(self, -1, "Yellow", pos=(610,20))
            btn_purple = wx.Button(self, -1, "Purple", pos=(710,20))
            self.Bind(wx.EVT_BUTTON, self.OnClick)

            # Create statusbar
            self.statusbar = self.CreateStatusBar(1)
            self.statusbar.SetStatusText('None')
            self.Show() 
开发者ID:michtesar,项目名称:color_recognizer,代码行数:42,代码来源:color_recognizer2.py

示例7: OnInit

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def OnInit(self):
        ret = BTApp.OnInit(self)
        f = Frame(None, wx.ID_ANY, "%s Language" % app_name,
                  style=wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX|wx.SYSTEM_MENU|wx.CAPTION|wx.CLOSE_BOX|wx.CLIP_CHILDREN|wx.RESIZE_BORDER)
        f.Show()
        return ret 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:8,代码来源:choose_language.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self, parent, id, title, text):
        wx.Frame.__init__(self, parent, id, title, style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MINIMIZE_BOX |
                                                          wx.MAXIMIZE_BOX))
        self.SetSize((400, 780))
        self.SetPosition((200, 0))
        self.ruleText = wx.TextCtrl(self, pos=(0, 0), size=(400, 780), style=wx.TE_MULTILINE | wx.TE_READONLY)
        self.ruleText.WriteText(text) 
开发者ID:Sorosliu1029,项目名称:Rule-based_Expert_System,代码行数:9,代码来源:main_frame.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self, repo):
        FrameStyle = wx.CAPTION | wx.RESIZE_BORDER | wx.SYSTEM_MENU |\
            wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.CLOSE_BOX
        wx.Frame.__init__(self, parent=None, id=-1, title="BookHub",
                          pos=(100, 100), size=(500, 600), style=FrameStyle)

        self.BuildUI()
        self.InitObjectListView(repo)
        self.InitSearchCtrls() 
开发者ID:JackonYang,项目名称:bookhub,代码行数:11,代码来源:frame_overview.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MINIMIZE_BOX [as 别名]
def __init__(self, *args, **kwargs):
    super(Frame, self).__init__(*args, **kwargs)

    self.MyFrame = self

    self.is_running = False

    self.panel = wx.Panel(
      self,
      pos=(0, 0),
      size=(500,100),
      style=wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX | wx.SYSTEM_MENU
    )
    self.panel.SetBackgroundColour('#ffffff')
    self.SetTitle('Filmow to Letterboxd')
    self.SetMinSize((500, 300))
    self.SetMaxSize((500, 300))

    self.letterboxd_link = hl.HyperLinkCtrl(
      self.panel,
      -1,
      'letterboxd',
      URL='https://letterboxd.com/import/',
      pos=(420,240)
    )
    self.letterboxd_link.SetToolTip(wx.ToolTip('Clica só quando o programa tiver rodado e sua conta no Letterboxd tiver criada, beleza?'))

    self.coffee_link = hl.HyperLinkCtrl(
      self.panel,
      -1,
      'quer me agradecer?',
      URL='https://www.buymeacoffee.com/yanari',
      pos=(310,240)
    )
    self.coffee_link.SetToolTip(wx.ToolTip('Se tiver dado tudo certo cê pode me pagar um cafézinho, que tal?. Não é obrigatório, claro.'))

    wx.StaticText(self.panel, -1, 'Username no Filmow:', pos=(25, 54))
    self.username = wx.TextCtrl(self.panel,  size=(200, 25), pos=(150, 50))
    submit_button = wx.Button(self.panel, wx.ID_SAVE, 'Submit', pos=(360, 50))

    self.Bind(wx.EVT_BUTTON, self.Submit, submit_button)
    self.Bind(wx.EVT_CLOSE, self.OnClose)

    self.Show(True) 
开发者ID:yanari,项目名称:filmow_to_letterboxd,代码行数:46,代码来源:filmow_to_letterboxd.py


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