• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(9044)  |  Call(9006)  |  Derive(38)  |  Import(0)
A button is a control that contains a text string, and is one of the most
common elements of a GUI.  It may be placed on a dialog box or panel, or
indeed almost any other window.

src/h/y/hylapex-HEAD/trunk/hylapex.py   hylapex(Download)
class BT(wx.Button):
    def __init__(self, parent, label, eventBind=None, funcBind=None):
        super(BT, self).__init__(parent, -1, label)
        if eventBind and funcBind:
            try:
                self.Bind(eventBind, funcBind)
            except:
 
        self.txtSearch = wx.TextCtrl(parent)
        self.choCol    = wx.Choice(parent)
        self.btSerch   = wx.Button(parent, label="Search")
        self.lstResult = wx.ListBox(parent)
 
        self.Bind(wx.EVT_CLOSE, self.onClose)

src/h/y/hylapex-HEAD/hylapex.py   hylapex(Download)
class BT(wx.Button):
    def __init__(self, parent, label, eventBind=None, funcBind=None):
        super(BT, self).__init__(parent, -1, label)
        if eventBind and funcBind:
            try:
                self.Bind(eventBind, funcBind)
            except:
 
        self.txtSearch = wx.TextCtrl(parent)
        self.choCol    = wx.Choice(parent)
        self.btSerch   = wx.Button(parent, label="Search")
        self.lstResult = wx.ListBox(parent)
 
        self.Bind(wx.EVT_CLOSE, self.onClose)

src/m/a/matplotlib-HEAD/matplotlib/lib/matplotlib/backends/backend_wx.py   matplotlib(Download)
        sizer.Add(wx.StaticText(dlg,-1,'in'),
                    1, wx.ALIGN_LEFT|wx.ALL, 2)
 
        btn = wx.Button(dlg,wx.ID_OK, " OK ")
        btn.SetDefault()
        sizer.Add(btn, 1, wx.ALIGN_LEFT, 5)
        btn = wx.Button(dlg,wx.ID_CANCEL, " CANCEL ")
class MenuButtonWx(wx.Button):
    """
    wxPython does not permit a menu to be incorporated directly into a toolbar.
    This class simulates the effect by associating a pop-up menu with a button
    in the toolbar, and managing this as though it were a menu.
    """
    def __init__(self, parent):

src/m/a/matplotlib-HEAD/lib/matplotlib/backends/backend_wx.py   matplotlib(Download)
        sizer.Add(wx.StaticText(dlg,-1,'in'),
                    1, wx.ALIGN_LEFT|wx.ALL, 2)
 
        btn = wx.Button(dlg,wx.ID_OK, " OK ")
        btn.SetDefault()
        sizer.Add(btn, 1, wx.ALIGN_LEFT, 5)
        btn = wx.Button(dlg,wx.ID_CANCEL, " CANCEL ")
class MenuButtonWx(wx.Button):
    """
    wxPython does not permit a menu to be incorporated directly into a toolbar.
    This class simulates the effect by associating a pop-up menu with a button
    in the toolbar, and managing this as though it were a menu.
    """
    def __init__(self, parent):

src/m/a/Matplotlib--JJ-s-dev-HEAD/lib/matplotlib/backends/backend_wx.py   Matplotlib--JJ-s-dev(Download)
        sizer.Add(wx.StaticText(dlg,-1,'in'),
                    1, wx.ALIGN_LEFT|wx.ALL, 2)
 
        btn = wx.Button(dlg,wx.ID_OK, " OK ")
        btn.SetDefault()
        sizer.Add(btn, 1, wx.ALIGN_LEFT, 5)
        btn = wx.Button(dlg,wx.ID_CANCEL, " CANCEL ")
class MenuButtonWx(wx.Button):
    """
    wxPython does not permit a menu to be incorporated directly into a toolbar.
    This class simulates the effect by associating a pop-up menu with a button
    in the toolbar, and managing this as though it were a menu.
    """
    def __init__(self, parent):

src/i/t/itrade-HEAD/trunk/itrade_wxutil.py   itrade(Download)
class Default_wxButton(wx.Button):
    def __init__(self,*args,**kwargs):
        apply(wx.Button.__init__, (self,) + args,kwargs)
        self.SetDefault()
 
def HTMLforSingleButton(label,id=None,makedefault=0):
    if id is None:
 
        # OK
        if style & wx.OK == wx.OK:
            btn = wx.Button(btnpane, wx.ID_OK, message('ok'))
            btn.SetDefault()
            btn.SetHelpText(message('ok_desc'))
            wx.EVT_BUTTON(self, wx.ID_OK, self.OnOK)
 
        # YES
        if style & wx.YES == wx.YES:
            btn = wx.Button(btnpane, wx.ID_YES, message('yes'))
 
        # NO
        if style & wx.NO == wx.NO:
            btn = wx.Button(btnpane, wx.ID_NO, message('no'))
            if style & wx.NO_DEFAULT == wx.NO_DEFAULT: btn.SetDefault()
            #btn.SetHelpText(message('no_desc'))
            wx.EVT_BUTTON(self, wx.ID_NO, self.OnNO)
 
        # CANCEL
        if style & wx.CANCEL == wx.CANCEL:
            btn = wx.Button(btnpane, wx.ID_CANCEL, message('cancel'))

src/q/t/qtrade-HEAD/trunk/qtrade_wxutil.py   qtrade(Download)
class Default_wxButton(wx.Button):
    def __init__(self,*args,**kwargs):
        apply(wx.Button.__init__, (self,) + args,kwargs)
        self.SetDefault()
 
def HTMLforSingleButton(label,id=None,makedefault=0):
    if id is None:
 
        # OK
        if style & wx.OK == wx.OK:
            btn = wx.Button(btnpane, wx.ID_OK, message('ok'))
            btn.SetDefault()
            btn.SetHelpText(message('ok_desc'))
            wx.EVT_BUTTON(self, wx.ID_OK, self.OnOK)
 
        # YES
        if style & wx.YES == wx.YES:
            btn = wx.Button(btnpane, wx.ID_YES, message('yes'))
 
        # NO
        if style & wx.NO == wx.NO:
            btn = wx.Button(btnpane, wx.ID_NO, message('no'))
            if style & wx.NO_DEFAULT == wx.NO_DEFAULT: btn.SetDefault()
            #btn.SetHelpText(message('no_desc'))
            wx.EVT_BUTTON(self, wx.ID_NO, self.OnNO)
 
        # CANCEL
        if style & wx.CANCEL == wx.CANCEL:
            btn = wx.Button(btnpane, wx.ID_CANCEL, message('cancel'))

src/i/t/itrade-HEAD/itrade_wxutil.py   itrade(Download)
class Default_wxButton(wx.Button):
    def __init__(self,*args,**kwargs):
        apply(wx.Button.__init__, (self,) + args,kwargs)
        self.SetDefault()
 
def HTMLforSingleButton(label,id=None,makedefault=0):
    if id is None:
 
        # OK
        if style & wx.OK == wx.OK:
            btn = wx.Button(btnpane, wx.ID_OK, message('ok'))
            btn.SetDefault()
            btn.SetHelpText(message('ok_desc'))
            wx.EVT_BUTTON(self, wx.ID_OK, self.OnOK)
 
        # YES
        if style & wx.YES == wx.YES:
            btn = wx.Button(btnpane, wx.ID_YES, message('yes'))
 
        # NO
        if style & wx.NO == wx.NO:
            btn = wx.Button(btnpane, wx.ID_NO, message('no'))
            if style & wx.NO_DEFAULT == wx.NO_DEFAULT: btn.SetDefault()
            #btn.SetHelpText(message('no_desc'))
            wx.EVT_BUTTON(self, wx.ID_NO, self.OnNO)
 
        # CANCEL
        if style & wx.CANCEL == wx.CANCEL:
            btn = wx.Button(btnpane, wx.ID_CANCEL, message('cancel'))

src/q/t/qtrade-HEAD/qtrade_wxutil.py   qtrade(Download)
class Default_wxButton(wx.Button):
    def __init__(self,*args,**kwargs):
        apply(wx.Button.__init__, (self,) + args,kwargs)
        self.SetDefault()
 
def HTMLforSingleButton(label,id=None,makedefault=0):
    if id is None:
 
        # OK
        if style & wx.OK == wx.OK:
            btn = wx.Button(btnpane, wx.ID_OK, message('ok'))
            btn.SetDefault()
            btn.SetHelpText(message('ok_desc'))
            wx.EVT_BUTTON(self, wx.ID_OK, self.OnOK)
 
        # YES
        if style & wx.YES == wx.YES:
            btn = wx.Button(btnpane, wx.ID_YES, message('yes'))
 
        # NO
        if style & wx.NO == wx.NO:
            btn = wx.Button(btnpane, wx.ID_NO, message('no'))
            if style & wx.NO_DEFAULT == wx.NO_DEFAULT: btn.SetDefault()
            #btn.SetHelpText(message('no_desc'))
            wx.EVT_BUTTON(self, wx.ID_NO, self.OnNO)
 
        # CANCEL
        if style & wx.CANCEL == wx.CANCEL:
            btn = wx.Button(btnpane, wx.ID_CANCEL, message('cancel'))

src/e/t/etm-664/etm/etmWX.py   etm(Download)
        hbox.Add(self.txt, 1, wx.EXPAND | wx.ALL, 10)
        box.Add(hbox, 1)
        subbox = wx.BoxSizer(wx.HORIZONTAL)
        btn = wx.Button(panel, wx.ID_OK, "OK")
        btn.SetDefault()
        subbox.Add(btn, 0, wx.ALIGN_RIGHT | wx.ALL, 8)
        self.Bind(wx.EVT_BUTTON, self.OnClose, btn)
class MyTodayButton(wx.Button):
    def AcceptsFocus(self, *args, **kwargs):
        return False
 
class MyCalCtrl(wx.calendar.CalendarCtrl):
 
    def AcceptsFocus(self, *args, **kwargs):

  1 | 2 | 3 | 4  Next