本文整理汇总了Python中wx.BORDER_NONE属性的典型用法代码示例。如果您正苦于以下问题:Python wx.BORDER_NONE属性的具体用法?Python wx.BORDER_NONE怎么用?Python wx.BORDER_NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.BORDER_NONE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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
示例2: _yCtrl
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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
示例3: create_bezel_buttons
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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()
示例4: Submit
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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)
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
def __init__(self, parent=None, flags=wx.BORDER_NONE):
super(ListBoxPopup, self).__init__(parent, flags)
self.__listbox = None
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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)
示例7: InitUI
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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))
示例8: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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)
示例9: create_paths_listctrl
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [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)
示例10: GenerateSearchResultsTreeBranch
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BORDER_NONE [as 别名]
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)