當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.BORDER_SIMPLE屬性代碼示例

本文整理匯總了Python中wx.BORDER_SIMPLE屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.BORDER_SIMPLE屬性的具體用法?Python wx.BORDER_SIMPLE怎麽用?Python wx.BORDER_SIMPLE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.BORDER_SIMPLE屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def __init__(
        self,
        parent = None,
        id = -1,
        label = "",
        pos = (-1, -1),
        size = (-1, -1),
        style = wx.BORDER_SIMPLE,
        name = "Monitors",
        background = wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENU)

    ):
        wx.Panel.__init__(self, parent, id, pos, size, style, name)
        b1 = 2
        b2 = 3
        b3 = self.GetWindowBorderSize()[1]
        lbl = wx.StaticText(self, -1, eg.text.General.monitorsLabel, pos = ((b2, b1)))
        lbl.Enable(False)
        monsCtrl = MonsListCtrl(self, ((b2, 2 * b1 + lbl.GetSize()[1])))
        self.SetBackgroundColour(wx.Colour(*background))
        monsCtrl.SetBackgroundColour(wx.Colour(*background))
        w, h = monsCtrl.GetRealSize()
        self.size = (w + 2 * b2 + 2, h + lbl.GetSize()[1] + 2 * b1 + b2 + b3)
        self.SetMinSize(self.size)
        self.Bind(wx.EVT_SIZE, self.OnSize) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:27,代碼來源:MonitorsCtrl.py

示例2: create_sizer_paths

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def create_sizer_paths(self):
        self.sizer_setting_paths = wx.StaticBoxSizer(wx.VERTICAL, self, "Wallpaper paths")
        self.statbox_parent_paths = self.sizer_setting_paths.GetStaticBox()
        st_paths_info = wx.StaticText(self.statbox_parent_paths, -1, "Browse to add your wallpaper files or source folders here:")
        if self.use_multi_image:
            self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                              style=wx.LC_REPORT
                                              | wx.BORDER_SIMPLE
                                              | wx.LC_SORT_ASCENDING
                                             )
            self.path_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width = 100)
            self.path_listctrl.InsertColumn(1, 'Source', width = 400)
        else:
            # show simpler listing without header if only one wallpaper target
            self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                              style=wx.LC_REPORT
                                              | wx.BORDER_SIMPLE
                                              | wx.LC_NO_HEADER
                                             )
            self.path_listctrl.InsertColumn(0, 'Source', width = 500)
        self.path_listctrl.SetImageList(self.image_list, wx.IMAGE_LIST_SMALL)

        self.sizer_setting_paths.Add(st_paths_info, 0, wx.ALIGN_LEFT|wx.ALL, 5)
        self.sizer_setting_paths.Add(
            self.path_listctrl, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5
            )
        # Buttons
        self.sizer_setting_paths_buttons = wx.BoxSizer(wx.HORIZONTAL)
        self.button_browse = wx.Button(self.statbox_parent_paths, label="Browse")
        self.button_remove_source = wx.Button(self.statbox_parent_paths, label="Remove selected source")
        self.button_browse.Bind(wx.EVT_BUTTON, self.onBrowsePaths)
        self.button_remove_source.Bind(wx.EVT_BUTTON, self.onRemoveSource)
        self.sizer_setting_paths_buttons.Add(self.button_browse, 0, wx.CENTER|wx.ALL, 5)
        self.sizer_setting_paths_buttons.Add(self.button_remove_source, 0, wx.CENTER|wx.ALL, 5)
        # add button sizer to parent paths sizer
        self.sizer_setting_paths.Add(self.sizer_setting_paths_buttons, 0, wx.CENTER|wx.EXPAND|wx.ALL, 0)

        self.sizer_settings_right.Add(
            self.sizer_setting_paths, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5
        ) 
開發者ID:hhannine,項目名稱:superpaper,代碼行數:42,代碼來源:gui.py

示例3: refresh_path_listctrl

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def refresh_path_listctrl(self, use_multi_image, migrate_paths=False):
        if use_multi_image == self.multi_column_listc and migrate_paths:
            self.sizer_main.Layout()
        else:
            if migrate_paths and self.path_listctrl.GetItemCount():
                # warn that paths can't be migrated
                msg = ("Wallpaper sources cannot be migrated between span"
                       " and multi image, continue?"
                       "\n"
                       "Saved sources are not affected until you overwrite.")
                res = show_message_dialog(msg, style="YES_NO")
                if not res:
                    # user canceled
                    return False
            self.path_listctrl.Destroy()
            self.image_list.RemoveAll()
            if use_multi_image:
                self.multi_column_listc = True
                self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                                 style=wx.LC_REPORT
                                                 | wx.BORDER_SIMPLE
                                                 | wx.LC_SORT_ASCENDING
                                                )
                self.path_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width=100)
                self.path_listctrl.InsertColumn(1, 'Source', width=400)
            else:
                self.multi_column_listc = False
                # show simpler listing without header if only one wallpaper target
                self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                                 style=wx.LC_REPORT
                                                 | wx.BORDER_SIMPLE
                                                 | wx.LC_NO_HEADER
                                                )
                self.path_listctrl.InsertColumn(0, 'Source', width=500)
            self.path_listctrl.SetImageList(self.image_list, wx.IMAGE_LIST_SMALL)
            self.sizer_setting_paths.Insert(1, self.path_listctrl, 1,
                                            wx.CENTER | wx.EXPAND | wx.ALL, 5)
            self.path_listctrl.InvalidateBestSize()
            self.sizer_main.Layout()
        return True 
開發者ID:hhannine,項目名稱:superpaper,代碼行數:42,代碼來源:gui.py

示例4: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def __init__(self, parent, id_):
        super(SCTPanel, self).__init__(parent=parent, id=id_)

        # Logo
        self.img_logo = self.get_logo()
        self.sizer_logo_sct = wx.BoxSizer(wx.VERTICAL)
        self.sizer_logo_sct.Add(self.img_logo, 0, wx.ALL, 5)

        # Citation
        txt_sct_citation = wx.VSCROLL | \
                           wx.HSCROLL | wx.TE_READONLY | \
                           wx.BORDER_SIMPLE
        html_sct_citation = html.HtmlWindow(self, wx.ID_ANY,
                                            size=(280, 115),
                                            style=txt_sct_citation)
        html_sct_citation.SetPage(self.DESCRIPTION_SCT)
        self.sizer_logo_sct.Add(html_sct_citation, 0, wx.ALL, 5)

        # Help button
        button_help = wx.Button(self, id=id_, label="Help")
        button_help.Bind(wx.EVT_BUTTON, self.tutorial)
        self.sizer_logo_sct.Add(button_help, 0, wx.ALL, 5)

        # Get function-specific description
        self.html_desc = self.get_description()

        # Organize boxes
        self.sizer_logo_text = wx.BoxSizer(wx.HORIZONTAL)  # create main box
        self.sizer_logo_text.Add(self.sizer_logo_sct, 0, wx.ALL, 5)
        # TODO: increase the width of the description box
        self.sizer_logo_text.Add(self.html_desc, 0, wx.ALL, 5)

        self.sizer_h = wx.BoxSizer(wx.HORIZONTAL)
        self.sizer_h.Add(self.sizer_logo_text) 
開發者ID:neuropoly,項目名稱:spinalcordtoolbox,代碼行數:36,代碼來源:sct_plugin.py

示例5: get_description

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def get_description(self):
        txt_style = wx.VSCROLL | \
                    wx.HSCROLL | wx.TE_READONLY | \
                    wx.BORDER_SIMPLE
        htmlw = html.HtmlWindow(self, wx.ID_ANY,
                                size=(280, 208),
                                style=txt_style)
        htmlw.SetPage(self.DESCRIPTION)
        return htmlw 
開發者ID:neuropoly,項目名稱:spinalcordtoolbox,代碼行數:11,代碼來源:sct_plugin.py

示例6: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def __init__(self, parent, choices=None):
        wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)

        self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL | wx.LB_SINGLE | wx.LB_SORT)

        choices = [] if choices is None else choices
        self.SetChoices(choices)

        self.ListBox.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
        self.ListBox.Bind(wx.EVT_MOTION, self.OnMotion) 
開發者ID:thiagoralves,項目名稱:OpenPLC_Editor,代碼行數:12,代碼來源:TextCtrlAutoComplete.py

示例7: create_paths_listctrl

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BORDER_SIMPLE [as 別名]
def create_paths_listctrl(self, use_multi_image):
        if use_multi_image:
            self.paths_listctrl = wx.ListCtrl(self, -1,
                                              size=(-1, -1),
                                              style=wx.LC_REPORT
                                              #  | wx.BORDER_SUNKEN
                                              | wx.BORDER_SIMPLE
                                              #  | wx.BORDER_STATIC
                                              #  | wx.BORDER_THEME
                                              #  | wx.BORDER_NONE
                                              #  | wx.LC_EDIT_LABELS
                                              | wx.LC_SORT_ASCENDING
                                              #  | wx.LC_NO_HEADER
                                              #  | wx.LC_VRULES
                                              #  | wx.LC_HRULES
                                              #  | wx.LC_SINGLE_SEL
                                             )
            self.paths_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width=100)
            self.paths_listctrl.InsertColumn(1, 'Source', width=620)
        else:
            # show simpler listing without header if only one wallpaper target
            self.paths_listctrl = wx.ListCtrl(self, -1,
                                              size=(-1, -1),
                                              style=wx.LC_REPORT
                                              #  | wx.BORDER_SUNKEN
                                              | wx.BORDER_SIMPLE
                                              #  | wx.BORDER_STATIC
                                              #  | wx.BORDER_THEME
                                              #  | wx.BORDER_NONE
                                              #  | wx.LC_EDIT_LABELS
                                              #  | wx.LC_SORT_ASCENDING
                                              | wx.LC_NO_HEADER
                                              #  | wx.LC_VRULES
                                              #  | wx.LC_HRULES
                                              #  | wx.LC_SINGLE_SEL
                                             )
            self.paths_listctrl.InsertColumn(0, 'Source', width=720)

        # Add the item list to the control
        self.paths_listctrl.SetImageList(self.il, wx.IMAGE_LIST_SMALL)

        self.sizer_paths_list.Add(self.paths_listctrl, 1, wx.CENTER|wx.ALL|wx.EXPAND, 5) 
開發者ID:hhannine,項目名稱:superpaper,代碼行數:44,代碼來源:configuration_dialogs.py


注:本文中的wx.BORDER_SIMPLE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。