Python wx.CLIP_CHILDREN Examples

The following are 14 code examples of wx.CLIP_CHILDREN(). 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: daily.py    From Bruno with MIT License 6 votes vote down vote up
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.''') 
Example #2
Source File: NamespaceTree.py    From EventGhost with GNU General Public License v2.0 6 votes vote down vote up
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") 
Example #3
Source File: __init__.py    From EventGhost with GNU General Public License v2.0 6 votes vote down vote up
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) 
Example #4
Source File: guicontrols.py    From wfuzz with GNU General Public License v2.0 5 votes vote down vote up
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) 
Example #5
Source File: __init__.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #6
Source File: SettingsWindow.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #7
Source File: SettingsWindow.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, main_window, config, setfunc):
        BTDialog.__init__(self, main_window, style=wx.DEFAULT_DIALOG_STYLE|wx.CLIP_CHILDREN|wx.WANTS_CHARS)
        self.Bind(wx.EVT_CLOSE, self.close)
        self.Bind(wx.EVT_CHAR, self.key)
        self.SetTitle(_("%s Settings")%app_name)

        self.setfunc = setfunc
        self.config = config

        self.notebook = wx.Notebook(self)

        self.notebook.Bind(wx.EVT_CHAR, self.key)

        self.general_panel    =    GeneralSettingsPanel(self.notebook)
        self.saving_panel     =     SavingSettingsPanel(self.notebook)
        self.network_panel    =    NetworkSettingsPanel(self.notebook)
        self.appearance_panel = AppearanceSettingsPanel(self.notebook)
        self.language_panel   =   LanguageSettingsPanel(self.notebook)

        self.vbox = VSizer()
        self.vbox.AddFirst(self.notebook, proportion=1, flag=wx.GROW)

        self.vbox.Layout()

        self.SetSizerAndFit(self.vbox)
        self.SetFocus() 
Example #8
Source File: Bling.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #9
Source File: profile_gui.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #10
Source File: new_properties.py    From wxGlade with MIT License 5 votes vote down vote up
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) 
Example #11
Source File: TreeCtrl.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
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) 
Example #12
Source File: __init__.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
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) 
Example #13
Source File: __init__.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
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)) 
Example #14
Source File: DownloadManager.py    From BitTorrent with GNU General Public License v3.0 4 votes vote down vote up
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()