def __init__(self, master, value, data_source, index):
     Entry.__init__(self, master=master)
     self.index = index
     self.data_source = data_source
     self.value = StringVar()
     self.config(textvariable=self.value, width=15)
     #           relief="ridge",
     #          bg="#ddddddddd", fg="#000000000")
     self.value.set(value)
Beispiel #2
0
 def __init__(self, master=None, **kw):
     """Construct a Ttk Spinbox widget with the parent master.
     STANDARD OPTIONS
         class, cursor, style, takefocus, validate,
         validatecommand, xscrollcommand, invalidcommand
     WIDGET-SPECIFIC OPTIONS
         to, from_, increment, values, wrap, format, command
     """
     Entry.__init__(self, master, "ttk::spinbox", **kw)
Beispiel #3
0
 def __init__(self, master, value, data_source, index):
     Entry.__init__(self, master=master)
     self.index = index
     self.data_source = data_source
     self.value = StringVar()
     self.config(textvariable=self.value, width=15)
     #           relief="ridge",
     #          bg="#ddddddddd", fg="#000000000")
     self.value.set(value)
     self.data_source.addListener(
         Listener(self, "<<navigate_record>>",
                  lambda e: self.on_data_source_change()))
Beispiel #4
0
    def __init__(self,
                 master,
                 numentries=0,
                 textvariable='',
                 justify='left',
                 width=20):
        # Inherit from tkinter.Entry
        Entry.__init__(self, master)

        # Create a frame for the entry box
        entryFrame = Frame(master)
        entryFrame.pack(side=LEFT, fill=X, expand=1)

        # Create a frame for the checkboxes
        checkFrame = Frame(master)
        checkFrame.pack(side=RIGHT)

        # Initialize the variables stored in the moddable
        # entrybox
        textMods = ['Italique', 'Gras', 'Souligner']
        self.checkVars = [IntVar() for _ in range(3)]

        # Create and array to store entries
        self.entries = []

        # Entry boxes
        # Include multiple entries if needed
        if numentries != 0:
            for i in range(numentries):
                entryBox = Entry(entryFrame,
                                 textvariable=textvariable,
                                 width=width,
                                 justify=justify)
                entryBox.pack(side=LEFT, fill=X, expand=1, pady=2)
                # Append each entry box to the entries array
                self.entries.append(entryBox)
        else:
            entryBox = Entry(entryFrame,
                             textvariable=textvariable,
                             width=width,
                             justify=justify)
            entryBox.pack(side=LEFT, fill=X, expand=1, pady=2)
            self.entries.append(entryBox)

        # Check boxes
        for i in range(3):
            Checkbutton(checkFrame,
                        variable=self.checkVars[i]).pack(side=RIGHT)
            Label(checkFrame, text=textMods[i]).pack(side=RIGHT)
    def __init__(self, parent, ph_text, ph_style=None, **kw):
        Entry.__init__(self, parent, **kw)
        if ph_style is None:
            ph_style = self.cget('style')
            if not ph_style:
                ph_style = self.winfo_class()
            ph_style = 'Placeholder.' + ph_style

        self.normal_style = self.cget('style')
        self.ph_style = ph_style
        self.ph_text = ph_text
        self.with_placeholder = False

        self.bind('<FocusIn>', self.onFocusIn, add="+")
        self.bind('<FocusOut>', self.onFocusOut, add="+")
        self.onFocusOut()
	def __init__(self,*args,**kwargs):
		Entry.__init__(self,*args,**kwargs)
		self.userEditable = True
Beispiel #7
0
 def __init__(self, *args, **kwargs):
     Entry.__init__(self, *args, **kwargs)
     self.userEditable = True
Beispiel #8
0
    def __init__(self, parent, *args, **kw):
        Entry.__init__(self, parent, *args, **kw)

        self.tooltip = Tooltip2(self, waittime=0, text='',
                                bg='white')  #, pad=(0, 0, 0, 0))