removed packing from toolbar
This commit is contained in:
parent
99678499ce
commit
6357062fec
2 changed files with 2 additions and 4 deletions
|
@ -172,12 +172,12 @@ class Toolbar(tk.Frame):
|
||||||
:param PIL.Image img: button image
|
:param PIL.Image img: button image
|
||||||
:param func: the command that is executed when button is clicked
|
:param func: the command that is executed when button is clicked
|
||||||
:param tkinter.Frame frame: frame that contains the button
|
:param tkinter.Frame frame: frame that contains the button
|
||||||
:param tkinter.Radiobutton main_button: main button
|
:param str tooltip: tooltip text
|
||||||
:return: nothing
|
:return: nothing
|
||||||
"""
|
"""
|
||||||
button = tk.Button(frame, width=self.width, height=self.height, image=img)
|
button = tk.Button(frame, width=self.width, height=self.height, image=img)
|
||||||
button.bind("<Button-1>", lambda e: func())
|
button.bind("<Button-1>", lambda e: func())
|
||||||
button.pack(side=tk.LEFT, pady=1)
|
button.grid(pady=1)
|
||||||
CreateToolTip(button, tooltip)
|
CreateToolTip(button, tooltip)
|
||||||
|
|
||||||
def create_radio_button(self, frame, image, func, variable, value, tooltip_msg):
|
def create_radio_button(self, frame, image, func, variable, value, tooltip_msg):
|
||||||
|
|
|
@ -14,8 +14,6 @@ class CreateToolTip(object):
|
||||||
self.tw = None
|
self.tw = None
|
||||||
|
|
||||||
def enter(self, event=None):
|
def enter(self, event=None):
|
||||||
x = 0
|
|
||||||
y = 0
|
|
||||||
x, y, cx, cy = self.widget.bbox("insert")
|
x, y, cx, cy = self.widget.bbox("insert")
|
||||||
x += self.widget.winfo_rootx()
|
x += self.widget.winfo_rootx()
|
||||||
y += self.widget.winfo_rooty() + 32
|
y += self.widget.winfo_rooty() + 32
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue