Esempio n. 1
0
    def _create_ui(self):
        self._wlabel = w = ttk.Label(self, text='w:', font='TkSmallCaptionFont')
        w.grid(row=0, column=0)
        self._weditor = w = EntryPropertyEditor(self)
        w.grid(row=0, column=1, sticky='we')
        w.parameters(width=4)

        self._wlabel = w = ttk.Label(self, text='h:', font='TkSmallCaptionFont')
        w.grid(row=0, column=2)
        self._heditor = w = EntryPropertyEditor(self)
        w.grid(row=0, column=3, sticky='we')
        w.parameters(width=4)

        self._weditor.bind('<<PropertyChanged>>', self._on_variable_changed)
        self._heditor.bind('<<PropertyChanged>>', self._on_variable_changed)

        self.rowconfigure(0, weight=1)
        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, weight=1)
    def _create_ui(self):
        self._entry = w = EntryPropertyEditor(self)
        w.grid(sticky='we')
        self._cbox = w = ChoicePropertyEditor(self)
        w.grid(row=0, column=1, sticky='we')
        self.rowconfigure(0, weight=1)
        self.columnconfigure(0, weight=1)

        self._entry.bind('<<PropertyChanged>>', self._on_variable_changed)
        self._cbox.bind('<<PropertyChanged>>', self._on_variable_changed)
        cbvalues = ('string', 'int', 'double', 'boolean')
        self._cbox.parameters(width=8, values=cbvalues, state='readonly')
Esempio n. 3
0
    def _create_ui(self):
        self._lbl_callback = _('Callback:')
        self._plabel = w = ttk.Label(self, text=self._lbl_callback,
                                     font='TkSmallCaptionFont')
        w.grid(row=0, column=0, sticky='nswe')

        self._cbname = w = EntryPropertyEditor(self)
        w.grid(row=0, column=1, sticky='nswe')
        w.bind('<<PropertyChanged>>', self._on_variable_changed)
        # type label:
        w = ttk.Label(self, text='Type:', font='TkSmallCaptionFont')
        w.grid(row=1, column=0, sticky='nsew')
        # type combo
        cmdtypes = (
            (CB_TYPES.SIMPLE, _('Simple')),
            (CB_TYPES.WITH_WID, _('Send widget ID')),
        )
        self._cmdtype = w = ChoiceByKeyPropertyEditor(self)
        w.parameters(values=cmdtypes)
        w.bind('<<PropertyChanged>>', self._on_variable_changed)
        w.grid(row=1, column=1, sticky='nswe')
        self.columnconfigure(1, weight=1)
 def _create_ui(self):
     self._cbname = w = EntryPropertyEditor(self)
     w.grid(row=0, column=0, sticky='nswe', columnspan=2)
     w.bind('<<PropertyChanged>>', self._on_variable_changed)
     self.columnconfigure(0, weight=1)
 def __init__(self, master=None, **kw):
     EntryPropertyEditor.__init__(self, master, **kw)