mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2026-10-22 18:02:08 +03:00
Delete previous text when putting a placeholder
This commit is contained in:
1 parent
9a6082c0e2
commit
7df4070944
1 file changed
+4
-1
+4
-1
@@ -1,4 +1,5 @@
|
||||
from config import config
|
||||
from Tkinter import END
|
||||
|
||||
class PlaceHolder():
|
||||
def __init__(self, placeholder, **kw):
|
||||
@@ -13,7 +14,9 @@ class PlaceHolder():
|
||||
|
||||
def put_placeholder(self):
|
||||
self['fg'] = self.placeholder_color
|
||||
self.insert(0, self.placeholder)
|
||||
if self.get() != self.placeholder:
|
||||
self.delete(0, END)
|
||||
self.insert(0, self.placeholder)
|
||||
|
||||
def force_placeholder_color(self):
|
||||
self['fg'] = self.placeholder_color
|
||||
|
||||
Reference in new issue
Block a user