Python wx.BORDER_SIMPLE Examples
The following are 7
code examples of wx.BORDER_SIMPLE().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: MonitorsCtrl.py From EventGhost with GNU General Public License v2.0 | 6 votes |
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)
Example #2
Source File: gui.py From superpaper with MIT License | 5 votes |
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 )
Example #3
Source File: gui.py From superpaper with MIT License | 5 votes |
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
Example #4
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
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)
Example #5
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
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
Example #6
Source File: TextCtrlAutoComplete.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
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)
Example #7
Source File: configuration_dialogs.py From superpaper with MIT License | 4 votes |
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)