Python wx.BORDER_NONE Examples
The following are 14
code examples of wx.BORDER_NONE().
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: toplevels_no_size_Phoenix.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: wxgMeasurementsByDayPnl.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) __szr_main = wx.BoxSizer(wx.HORIZONTAL) self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5) self._LCTRL_days_copy = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days_copy.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days_copy, 1, wx.EXPAND | wx.RIGHT, 5) self.SetSizer(__szr_main) __szr_main.Fit(self) self.Layout() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days_copy) # end wxGlade
Example #2
Source File: toplevels_no_size_Classic.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: wxgMeasurementsByDayPnl.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) __szr_main = wx.BoxSizer(wx.HORIZONTAL) self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5) self._LCTRL_days_copy = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days_copy.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days_copy, 1, wx.EXPAND | wx.RIGHT, 5) self.SetSizer(__szr_main) __szr_main.Fit(self) self.Layout() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days_copy) # end wxGlade
Example #3
Source File: yamled.py From report-ng with GNU General Public License v2.0 | 5 votes |
def _yCtrl (self): ctrl = self.yTextCtrl(self.stack, self, size=(-1, self.item_height), style=wx.BORDER_NONE) #ctrl = self.yTextCtrl(self.stack, self, size=(-1, self.item_height), style=wx.BORDER_NONE | wx.TE_RICH2) #ctrl.SetBackgroundColour((250,250,0)) #ctrl.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENU)) return ctrl
Example #4
Source File: gui.py From superpaper with MIT License | 5 votes |
def create_bezel_buttons(self): # load icons into bitmaps rb_png = os.path.join(RESOURCES_PATH, "icons8-merge-vertical-96.png") bb_png = os.path.join(RESOURCES_PATH, "icons8-merge-horizontal-96.png") rb_img = wx.Image(rb_png, type=wx.BITMAP_TYPE_ANY) bb_img = wx.Image(bb_png, type=wx.BITMAP_TYPE_ANY) rb_bmp = rb_img.Scale(20, 20).Resize((20, 20), (0, 0)).ConvertToBitmap() bb_bmp = bb_img.Scale(20, 20).Resize((20, 20), (0, 0)).ConvertToBitmap() # create bitmap buttons for st_bmp in self.preview_img_list: butts = [] butt_rb = wx.BitmapButton(self, bitmap=rb_bmp, name="butt_bez_r", style=wx.BORDER_NONE) butt_bb = wx.BitmapButton(self, bitmap=bb_bmp, name="butt_bez_b", style=wx.BORDER_NONE) bez_butt_color = wx.Colour(41, 47, 52) butt_rb.SetBackgroundColour(bez_butt_color) butt_bb.SetBackgroundColour(bez_butt_color) self.bez_butt_sz = butt_rb.GetSize() pos_rb, pos_bb = self.bezel_button_positions(st_bmp) butt_rb.SetPosition((pos_rb[0], pos_rb[1])) butt_bb.SetPosition((pos_bb[0], pos_bb[1])) butt_rb.Bind(wx.EVT_BUTTON, self.onBezelButton) butt_bb.Bind(wx.EVT_BUTTON, self.onBezelButton) self.bez_buttons.append( ( butt_rb, butt_bb ) ) self.show_bezel_buttons(False) self.create_bezel_popups()
Example #5
Source File: filmow_to_letterboxd.py From filmow_to_letterboxd with MIT License | 5 votes |
def Submit(self, event): self.button = event.GetEventObject() self.button.Disable() self.text_control = wx.TextCtrl( self.panel, -1, '', pos=(50, 120), size=(400, 100), style=wx.TE_MULTILINE | wx.TE_CENTRE | wx.TE_READONLY | wx.TE_NO_VSCROLL | wx.TE_AUTO_URL | wx.TE_RICH2 | wx.BORDER_NONE ) self.Parse(self.MyFrame)
Example #6
Source File: widgets.py From youtube-dl-gui with The Unlicense | 5 votes |
def __init__(self, parent=None, flags=wx.BORDER_NONE): super(ListBoxPopup, self).__init__(parent, flags) self.__listbox = None
Example #7
Source File: benchmarks.py From nuxhash with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, *args, **kwargs): wx.StaticText.__init__( self, parent, *args, style=wx.BORDER_NONE|wx.TE_CENTRE, size=(-1, 20), **kwargs) self._StatusPos = 0 self.Bind(wx.EVT_KILL_FOCUS, self._OnUnfocus)
Example #8
Source File: main.py From python-examples with MIT License | 5 votes |
def InitUI(self): img_color = wx.Image('Obrazy/furas.png') img_grey = img_color.ConvertToGreyscale(0.3, 0.3, 0.3) self.hbox = wx.BoxSizer(wx.HORIZONTAL) self.panel = wx.Panel(self) self.panel.SetSizer(self.hbox) self.bitmap_color = wx.Bitmap(img_color) self.bitmap_grey = wx.Bitmap(img_grey) #self.image = wx.StaticBitmap(self.panel, 1, self.bitmap_color) self.image = wx.BitmapButton(self.panel, 1, self.bitmap_color, style=wx.BORDER_NONE) # use 0 to not resize image to full window self.hbox.Add(self.image, 0) # binds don't work on Linux for StaticBitmap # but they works for BitmapButton (but Button has border) self.image.Bind(wx.EVT_ENTER_WINDOW, self.OnOver) self.image.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeave) # set color to see how many space use it self.panel.SetBackgroundColour((0,255,0)) # set color to see how many space use it self.image.SetBackgroundColour((255,0,0))
Example #9
Source File: viewer_tools.py From dials with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, *args, **kwargs): kwargs["style"] = kwargs.get("style", 0) | wx.BORDER_NONE super(ImageChooserControl, self).__init__(*args, **kwargs) self._slider = wx.Slider(self, -1, style=wx.SL_AUTOTICKS) self._slider.SetMin(1) self._label = wx.StaticText(self, -1, "Some Text") # Work out the maximum size of the text so that we can cut off the slider to allow room if WX3: _, size_y = self._label.GetAdjustedBestSize() self._label.SetFont(self._label.GetFont().Italic()) self.size_y = max(size_y, self._label.GetAdjustedBestSize()[1]) else: _, size_y = self._label.GetEffectiveMinSize() self._label.SetFont(self._label.GetFont().Italic()) self.size_y = max(size_y, self._label.GetEffectiveMinSize()[1]) # Use a horizontal box to control vertical alignment labelSizer = wx.BoxSizer(wx.HORIZONTAL) labelSizer.Add(self._label, flag=wx.ALL | wx.ALIGN_BOTTOM) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self._slider, flag=wx.ALL | wx.ALIGN_LEFT) sizer.Add(labelSizer, proportion=1, flag=wx.EXPAND) self.SetSizer(sizer)
Example #10
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)
Example #11
Source File: toplevels_no_size_Phoenix.py From wxGlade with MIT License | 4 votes |
def __init__(self, *args, **kwds): # begin wxGlade: wxgMeasurementsByDayPnl.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) __szr_main = wx.BoxSizer(wx.HORIZONTAL) self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5) self._LCTRL_results = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_results.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_results, 1, wx.EXPAND | wx.RIGHT, 5) __szr_details = wx.BoxSizer(wx.VERTICAL) __szr_main.Add(__szr_details, 1, wx.EXPAND, 0) self._TCTRL_measurements = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY) self._TCTRL_measurements.SetMinSize((255, 102)) self._TCTRL_measurements.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)) __szr_details.Add(self._TCTRL_measurements, 1, wx.EXPAND, 0) __szr_show_docs = wx.BoxSizer(wx.HORIZONTAL) __szr_details.Add(__szr_show_docs, 0, wx.EXPAND, 0) self._LBL_no_of_docs = wx.StaticText(self, wx.ID_ANY, "") self._LBL_no_of_docs.SetMinSize((100, 100)) __szr_show_docs.Add(self._LBL_no_of_docs, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) self._BTN_show_docs = wx.Button(self, wx.ID_ANY, "Show X documents") self._BTN_show_docs.SetMinSize((100, 100)) self._BTN_show_docs.SetToolTip("Show lab related documents for the episode of the selected measurement.") self._BTN_show_docs.Enable(False) __szr_show_docs.Add(self._BTN_show_docs, 0, wx.ALIGN_CENTER_VERTICAL, 0) __szr_show_docs.Add((20, 20), 1, wx.EXPAND, 0) self.SetSizer(__szr_main) __szr_main.Fit(self) self.Layout() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_result_selected, self._LCTRL_results) self.Bind(wx.EVT_BUTTON, self._on_show_docs_button_pressed, self._BTN_show_docs) # end wxGlade
Example #12
Source File: toplevels_no_size_Phoenix.py From wxGlade with MIT License | 4 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame1.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetTitle("frame_1") __szr_main = wx.BoxSizer(wx.HORIZONTAL) self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5) self._LCTRL_results = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_results.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_results, 1, wx.EXPAND | wx.RIGHT, 5) __szr_details = wx.BoxSizer(wx.VERTICAL) __szr_main.Add(__szr_details, 1, wx.EXPAND, 0) self._TCTRL_measurements = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY) self._TCTRL_measurements.SetMinSize((255, 102)) self._TCTRL_measurements.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)) __szr_details.Add(self._TCTRL_measurements, 1, wx.EXPAND, 0) __szr_show_docs = wx.BoxSizer(wx.HORIZONTAL) __szr_details.Add(__szr_show_docs, 0, wx.EXPAND, 0) self._LBL_no_of_docs = wx.StaticText(self, wx.ID_ANY, "") self._LBL_no_of_docs.SetMinSize((100, 100)) __szr_show_docs.Add(self._LBL_no_of_docs, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) self._BTN_show_docs = wx.Button(self, wx.ID_ANY, "Show X documents") self._BTN_show_docs.SetMinSize((100, 100)) self._BTN_show_docs.SetToolTip("Show lab related documents for the episode of the selected measurement.") self._BTN_show_docs.Enable(False) __szr_show_docs.Add(self._BTN_show_docs, 0, wx.ALIGN_CENTER_VERTICAL, 0) __szr_show_docs.Add((20, 20), 1, wx.EXPAND, 0) self.SetSizer(__szr_main) __szr_main.Fit(self) self.Layout() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_result_selected, self._LCTRL_results) self.Bind(wx.EVT_BUTTON, self._on_show_docs_button_pressed, self._BTN_show_docs) # end wxGlade
Example #13
Source File: toplevels_no_size_Classic.py From wxGlade with MIT License | 4 votes |
def __init__(self, *args, **kwds): # begin wxGlade: wxgMeasurementsByDayPnl.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) __szr_main = wx.BoxSizer(wx.HORIZONTAL) self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_days.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5) self._LCTRL_results = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) self._LCTRL_results.SetMinSize((100, 100)) __szr_main.Add(self._LCTRL_results, 1, wx.EXPAND | wx.RIGHT, 5) __szr_details = wx.BoxSizer(wx.VERTICAL) __szr_main.Add(__szr_details, 1, wx.EXPAND, 0) self._TCTRL_measurements = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY) self._TCTRL_measurements.SetMinSize((255, 102)) self._TCTRL_measurements.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND)) __szr_details.Add(self._TCTRL_measurements, 1, wx.EXPAND, 0) __szr_show_docs = wx.BoxSizer(wx.HORIZONTAL) __szr_details.Add(__szr_show_docs, 0, wx.EXPAND, 0) self._LBL_no_of_docs = wx.StaticText(self, wx.ID_ANY, "") self._LBL_no_of_docs.SetMinSize((100, 100)) __szr_show_docs.Add(self._LBL_no_of_docs, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) self._BTN_show_docs = wx.Button(self, wx.ID_ANY, "Show X documents") self._BTN_show_docs.SetMinSize((100, 100)) self._BTN_show_docs.SetToolTip(wx.ToolTip("Show lab related documents for the episode of the selected measurement.")) self._BTN_show_docs.Enable(False) __szr_show_docs.Add(self._BTN_show_docs, 0, wx.ALIGN_CENTER_VERTICAL, 0) __szr_show_docs.Add((20, 20), 1, wx.EXPAND, 0) self.SetSizer(__szr_main) __szr_main.Fit(self) self.Layout() self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_result_selected, self._LCTRL_results) self.Bind(wx.EVT_BUTTON, self._on_show_docs_button_pressed, self._BTN_show_docs) # end wxGlade
Example #14
Source File: SearchResultPanel.py From OpenPLC_Editor with GNU General Public License v3.0 | 4 votes |
def GenerateSearchResultsTreeBranch(self, root, infos): if infos["name"] == "body": item_name = "%d:" % infos["data"][1][0] else: item_name = infos["name"] self.SearchResultsTree.SetItemText(root, item_name) self.SearchResultsTree.SetPyData(root, infos["data"]) self.SearchResultsTree.SetItemBackgroundColour(root, wx.WHITE) self.SearchResultsTree.SetItemTextColour(root, wx.BLACK) if infos["type"] is not None: if infos["type"] == ITEM_POU: self.SearchResultsTree.SetItemImage(root, self.TreeImageDict[self.ParentWindow.Controler.GetPouType(infos["name"])]) else: self.SearchResultsTree.SetItemImage(root, self.TreeImageDict[infos["type"]]) text = None if infos["text"] is not None: text = infos["text"] start, end = infos["data"][1:3] text_lines = infos["text"].splitlines() start_idx = start[1] end_idx = reduce(lambda x, y: x + y, map(lambda x: len(x) + 1, text_lines[:end[0] - start[0]]), end[1] + 1) style = wx.TextAttr(wx.BLACK, wx.Colour(206, 204, 247)) elif infos["type"] is not None and infos["matches"] > 1: text = _("(%d matches)") % infos["matches"] start_idx, end_idx = 0, len(text) style = wx.TextAttr(wx.Colour(0, 127, 174)) if text is not None: text_ctrl_style = wx.BORDER_NONE | wx.TE_READONLY | wx.TE_RICH2 if wx.Platform != '__WXMSW__' or len(text.splitlines()) > 1: text_ctrl_style |= wx.TE_MULTILINE | wx.TE_NO_VSCROLL text_ctrl = wx.TextCtrl(id=-1, parent=self.SearchResultsTree, pos=wx.Point(0, 0), value=text, style=text_ctrl_style) width, height = text_ctrl.GetTextExtent(text) text_ctrl.SetClientSize(wx.Size(width + 1, height)) text_ctrl.SetBackgroundColour(self.SearchResultsTree.GetBackgroundColour()) text_ctrl.Bind(wx.EVT_LEFT_DOWN, self.GetTextCtrlClickFunction(root)) text_ctrl.Bind(wx.EVT_LEFT_DCLICK, self.GetTextCtrlDClickFunction(root)) text_ctrl.SetInsertionPoint(0) text_ctrl.SetStyle(start_idx, end_idx, style) self.SearchResultsTree.SetItemWindow(root, text_ctrl) item, root_cookie = self.SearchResultsTree.GetFirstChild(root) for child in infos["children"]: if item is None: item = self.SearchResultsTree.AppendItem(root, "") item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie) self.GenerateSearchResultsTreeBranch(item, child) item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie)