本文整理汇总了Python中wx.CLIP_CHILDREN属性的典型用法代码示例。如果您正苦于以下问题:Python wx.CLIP_CHILDREN属性的具体用法?Python wx.CLIP_CHILDREN怎么用?Python wx.CLIP_CHILDREN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.CLIP_CHILDREN属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [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.''')
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, namespace):
self.namespace = namespace
wx.gizmos.TreeListCtrl.__init__(
self,
parent,
style=(
wx.TR_FULL_ROW_HIGHLIGHT |
wx.TR_DEFAULT_STYLE |
wx.VSCROLL |
wx.ALWAYS_SHOW_SB #|
#wx.CLIP_CHILDREN
)
)
self.AddColumn("Name")
self.AddColumn("Type")
self.AddColumn("Value")
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, plugin, pos, alwaysOnTop):
style = wx.SYSTEM_MENU|wx.MINIMIZE_BOX|wx.CLIP_CHILDREN|wx.CLOSE_BOX
if not plugin.showInTaskbar:
style |= wx.FRAME_NO_TASKBAR
if plugin.windowStyle == 0:
style |= wx.CAPTION
elif plugin.windowStyle == 1:
style |= wx.RAISED_BORDER
elif plugin.windowStyle == 2:
style |= wx.NO_BORDER|wx.FRAME_SHAPED
if alwaysOnTop:
style |= wx.STAY_ON_TOP
wx.Frame.__init__(
self,
None,
title=plugin.caption,
pos=pos,
style=style
)
self.SetBackgroundColour(plugin.windowColour)
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, id=-1, title="Wfuzz", pos=wx.DefaultPosition,
size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN
):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, *a, **k):
k['style'] = k.get('style', 0) | wx.CLIP_CHILDREN
wx.Panel.__init__(self, *a, **k)
self.sizer = self.sizer_class(*self.sizer_args)
self.SetSizer(self.sizer)
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, *a, **k):
style = k.get('style', 0)
k['style'] = style | wx.CLIP_CHILDREN | wx.TAB_TRAVERSAL
# aarrg
self.settings_window = parent.GetParent()
wx.Panel.__init__(self, parent, *a, **k)
parent.AddPage(self, self.label)
self.sizer = VSizer()
self.SetSizerAndFit(self.sizer)
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, history, *a, **k):
super(BlingWindow, self).__init__(parent, title="Details",
size=(640, 280),
style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE|wx.CLIP_CHILDREN)
self.Bind(wx.EVT_CLOSE, self.close)
self.bling = BandwidthGraphPanel(self, history)
self.SetBackgroundColour(self.bling.GetBackgroundColour())
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.bling, flag=wx.GROW, proportion=1)
self.SetSizer(self.sizer)
示例8: OnInit
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def OnInit(self):
f = wx.Frame(None)
t = wx.TreeCtrl(f, style=0
| wx.TR_HAS_BUTTONS
| wx.TR_TWIST_BUTTONS
| wx.TR_FULL_ROW_HIGHLIGHT
#| wx.TR_HIDE_ROOT
#| wx.TR_ROW_LINES
| wx.TR_MULTIPLE
| wx.TR_EXTENDED
#| wx.TR_NO_LINES
#| wx.NO_FULL_REPAINT_ON_RESIZE
| wx.CLIP_CHILDREN
,)
r = t.AddRoot("Profile")
g = GuiStats(sys.argv[1])
g.gui_print(t, r)
t.Expand(r)
f.Show(True)
return True
示例9: create_editor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def create_editor(self, panel, sizer):
label = self._find_label()
style = wx.RA_SPECIFY_COLS | wx.NO_BORDER | wx.CLIP_CHILDREN
self.options = wx.RadioBox(panel, -1, label, choices=self.labels, majorDimension=self.columns, style=style)
sizer.Add(self.options, 0, wx.EXPAND)
if self.tooltips:
for i,tooltip in enumerate(self.tooltips):
if tooltip:
self.options.SetItemToolTip(i, tooltip)
else:
self._set_tooltip(self.options)
self.update_display(True)
self.options.Bind(wx.EVT_RADIOBOX, self.on_radio)
示例10: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, document, size=wx.DefaultSize):
self.document = document
self.root = None
self.editLabelId = None
self.insertionMark = None
self.editControl = EditControlProxy(self)
style = (
wx.TR_HAS_BUTTONS |
wx.TR_EDIT_LABELS |
wx.TR_ROW_LINES |
wx.CLIP_CHILDREN
)
wx.TreeCtrl.__init__(self, parent, size=size, style=style)
self.SetImageList(eg.Icons.gImageList)
self.hwnd = self.GetHandle()
self.normalfont = self.GetFont()
self.italicfont = self.GetFont()
self.italicfont.SetStyle(wx.FONTSTYLE_ITALIC)
self.Bind(wx.EVT_SET_FOCUS, self.OnGetFocusEvent)
self.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocusEvent)
self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.OnItemExpandingEvent)
self.Bind(wx.EVT_TREE_ITEM_COLLAPSING, self.OnItemCollapsingEvent)
self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnBeginLabelEditEvent)
self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnEndLabelEditEvent)
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnItemActivateEvent)
self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDoubleClickEvent)
self.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK, self.OnRightClickEvent)
self.Bind(wx.EVT_TREE_ITEM_MENU, self.OnItemMenuEvent)
self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.OnBeginDragEvent)
self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelectionChangedEvent)
self.visibleNodes = {}
self.expandedNodes = document.expandedNodes
self.dropTarget = DropTarget(self)
self.SetDropTarget(self.dropTarget)
eg.Bind("NodeAdded", self.OnNodeAdded)
eg.Bind("NodeDeleted", self.OnNodeDeleted)
eg.Bind("NodeChanged", self.OnNodeChanged)
eg.Bind("NodeSelected", self.OnNodeSelected)
eg.Bind("DocumentNewRoot", self.OnNewRoot)
if document.root:
self.OnNewRoot(document.root)
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent, text, menuData, selectedItem=None):
self.highestMenuId = 0
wx.gizmos.TreeListCtrl.__init__(
self,
parent,
style = wx.TR_FULL_ROW_HIGHLIGHT
|wx.TR_DEFAULT_STYLE
|wx.VSCROLL
|wx.ALWAYS_SHOW_SB
|wx.CLIP_CHILDREN
)
self.SetMinSize((10, 150))
self.AddColumn(text.labelHeader)
self.AddColumn(text.eventHeader)
root = self.AddRoot(text.name)
for data in menuData:
name, kind, eventName, menuId = data
if menuId > self.highestMenuId:
self.highestMenuId = menuId
eventName = data[2]
item = self.AppendItem(root, name)
self.SetItemText(item, eventName, 1)
self.SetPyData(item, data)
if menuId == selectedItem:
self.SelectItem(item)
self.SetColumnWidth(0, 200)
self.ExpandAll(root)
self.__inSizing = False
self.GetMainWindow().Bind(wx.EVT_SIZE, self.OnSize)
示例12: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, parent=None):
wx.Frame.__init__(
self,
parent,
style=wx.NO_BORDER|wx.FRAME_NO_TASKBAR|wx.CLIP_CHILDREN
)
self.drawing = None
self.displayNum = 0
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
self.Bind(wx.EVT_KEY_DOWN, self.OnChar)
self.Bind(wx.EVT_MOTION, self.ShowCursor)
self.timer = None
self.SetBackgroundColour((0, 0, 0))
示例13: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import CLIP_CHILDREN [as 别名]
def __init__(self, main):
BTDialog.__init__(self, main, size = (300,400),
style=wx.DEFAULT_DIALOG_STYLE|wx.CLIP_CHILDREN|wx.WANTS_CHARS)
self.Bind(wx.EVT_CLOSE, self.close)
self.SetTitle(_("About %s")%app_name)
self.sizer = VSizer()
i = wx.the_app.image_library.get(('logo', 'banner'))
b = wx.BitmapFromImage(i)
self.bitmap = ElectroStaticBitmap(self, b)
self.sizer.AddFirst(self.bitmap, flag=wx.ALIGN_CENTER_HORIZONTAL)
version_str = version
if int(version_str[2]) % 2:
version_str = version_str + ' ' + _("Beta")
if '__WXGTK__' in wx.PlatformInfo:
# wtf, "Version" forces a line break before the
# version_str on WXGTK only -- most other strings work
# fine.
version_text = _("version %s") % version_str
else:
version_text = _("Version %s") % version_str
version_label = ElectroStaticText(self, label=version_text)
self.sizer.Add(version_label, flag=wx.ALIGN_CENTER_HORIZONTAL)
if branch is not None:
blabel = ElectroStaticText(self, label='working dir: %s' % branch)
self.sizer.Add(blabel, flag=wx.ALIGN_CENTER_HORIZONTAL)
self.credits_scroll = CreditsScroll(self, 'credits', style=wx.TE_CENTRE)
self.lic_scroll = CreditsScroll(self, 'LICENSE', style=wx.TE_CENTRE)
self.sizer.Add(self.lic_scroll, flag=wx.GROW, proportion=1)
self.sizer.Add(self.credits_scroll, flag=wx.GROW, proportion=1)
self.lic_scroll.Hide()
self.button_sizer = HSizer()
self.credits_button = wx.Button(parent=self, id=wx.ID_ANY, label=_("Li&cense"))
self.credits_button.Bind(wx.EVT_BUTTON, self.toggle_credits)
self.button_sizer.AddFirst(self.credits_button)
self.sizer.Add(self.button_sizer, flag=wx.ALIGN_CENTER_HORIZONTAL, proportion=0, border=0)
self.SetSizerAndFit(self.sizer)
for w in (self, self.bitmap,
self.credits_scroll,
self.credits_button):
w.Bind(wx.EVT_CHAR, self.key)
self.SetFocus()