Python Forum
How to make a button always stay on a point when resizing the window?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a button always stay on a point when resizing the window?
#3
(Nov-03-2020, 07:00 PM)deanhystad Wrote: Please provide an example when you ask a question. The example can be very short. Like this:
from tkinter import *
root = Tk()
button = Button(root, text='Push Me')
button.pack(side=LEFT, anchor='se', padx=10, pady=10)
Learn how to use the good tkinter layout managers (pack and grid). Banish the bad layout manager (place).

Okay, here is my code:
icons = {}
icons['menu'] = PhotoImage(file = "icons/initmenu.gif")
button = Button(a, image=icons['menu'], command=open)
button.place(x=2, y=10, anchor=N)
Reply


Messages In This Thread
RE: How to make a button always stay on a point when resizing the window? - by _ShevaKadu - Nov-04-2020, 02:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to call and focus any popup window outside of the main window app? Valjean 6 1,957 Oct-02-2023, 04:11 PM
Last Post: deanhystad
  how to open a popup window in tkinter with entry,label and button lunacy90 1 968 Sep-01-2023, 12:07 AM
Last Post: lunacy90
Bug tkinter.TclError: bad window path name "!button" V1ber 2 870 Aug-14-2023, 02:46 PM
Last Post: V1ber
  Tkinter Pillow Resize Image Looks Choppy While Resizing AaronCatolico1 2 1,455 Jan-03-2023, 05:41 PM
Last Post: AaronCatolico1
  Pyspark Window: perform sum over a window with specific conditions Shena76 0 1,218 Jun-13-2022, 08:59 AM
Last Post: Shena76
Sad Selenium: can't open a new window after clicking a button and I don't know why noahverner1995 0 2,017 Jan-22-2022, 09:55 AM
Last Post: noahverner1995
  Closing Threads and the chrome window it spawned from Tkinter close button law 0 1,758 Jan-08-2022, 12:13 PM
Last Post: law
  Make these LEDs stay on duckredbeard 5 3,040 Apr-08-2021, 10:26 PM
Last Post: duckredbeard
  connecting the first point to the last point Matplotlib omar_mohsen 0 4,670 Jan-15-2020, 01:23 PM
Last Post: omar_mohsen
  rotating and resizing objects jenya56 3 2,426 Jul-26-2019, 12:06 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020