コード例 #1
0
ファイル: CheckBox.py プロジェクト: rceballos98/hapticJacket
 def __init__(self, title="New Check Box", font=system_font, **kwds):
     ns_button = self._create_ns_button(
         title=title, font=font, ns_button_type=AppKit.NSSwitchButton, ns_bezel_style=AppKit.NSRoundedBezelStyle
     )
     # if mixed:
     # 	self._ns_mixed = True
     # 	ns_button.setAllowsMixedState_(True)
     GCheckBox.__init__(self, _ns_view=ns_button, **kwds)
コード例 #2
0
ファイル: CheckBox.py プロジェクト: tomihasa/pygui
 def __init__(self, title="New Checkbox", **kwds):
     font = self._win_predict_font(kwds)
     self._auto_toggle = kwds.pop('auto_toggle', True)
     self._mixed = kwds.get('mixed', False)
     w = font.width(title) + win_hpad + win_check_size
     h = max(self._calc_height(font), win_check_size)
     win_style = self._win_button_style()
     win = self._win_create_button(title, win_style, w, h)
     GCheckBox.__init__(self, _win=win, **kwds)
コード例 #3
0
 def __init__(self, title = "New Checkbox", **kwds):
     font = self._win_predict_font(kwds)
     self._auto_toggle = kwds.pop('auto_toggle', True)
     self._mixed = kwds.get('mixed', False)
     w = font.width(title) + win_hpad + win_check_size
     h = max(self._calc_height(font), win_check_size)
     win_style = self._win_button_style()
     win = self._win_create_button(title, win_style, w, h)
     GCheckBox.__init__(self, _win = win, **kwds)
コード例 #4
0
ファイル: CheckBox.py プロジェクト: mnabeelp/PyGUI
 def __init__(self, title="New Check Box", font=system_font, **kwds):
     ns_button = self._create_ns_button(
         title=title,
         font=font,
         ns_button_type=AppKit.NSSwitchButton,
         ns_bezel_style=AppKit.NSRoundedBezelStyle)
     #if mixed:
     #	self._ns_mixed = True
     #	ns_button.setAllowsMixedState_(True)
     GCheckBox.__init__(self, _ns_view=ns_button, **kwds)
コード例 #5
0
ファイル: CheckBox.py プロジェクト: tomihasa/pygui
 def set_mixed(self, v):
     GCheckBox.set_mixed(self, v)
     self._win_update_button_style()
コード例 #6
0
ファイル: CheckBox.py プロジェクト: rceballos98/hapticJacket
 def __init__(self, title="New Control", **kwds):
     gtk_checkbox = gtk.CheckButton(title)
     gtk_checkbox.show()
     self._gtk_connect(gtk_checkbox, "clicked", self._gtk_clicked_signal)
     self._gtk_inhibit_action = 0
     GCheckBox.__init__(self, _gtk_outer=gtk_checkbox, **kwds)
コード例 #7
0
ファイル: CheckBox.py プロジェクト: tomihasa/pygui
 def __init__(self, title="New Control", **kwds):
     gtk_checkbox = gtk.CheckButton(title)
     gtk_checkbox.show()
     self._gtk_connect(gtk_checkbox, 'clicked', self._gtk_clicked_signal)
     self._gtk_inhibit_action = 0
     GCheckBox.__init__(self, _gtk_outer=gtk_checkbox, **kwds)
コード例 #8
0
 def set_mixed(self, v):
     GCheckBox.set_mixed(self, v)
     self._win_update_button_style()