Python Forum
[Tkinter] how to make label or button not visible with the place method?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] how to make label or button not visible with the place method?
#2
Please show what you have tried. The code in your post makes no attempt at hiding a label.

Normally you would use pack/pack_forget to have a widget appear/disappear. If you need to place() the widget (which I think is a terrible idea), pack the widget in a frame, and place the frame.

A few comments about your example:

Why do you do this bg=('green') instead of this bg('green'? The parenthesis are not needed.

.place(x=50,y=400) returns None, which means labe2 is None.
Reply


Messages In This Thread
RE: how to make label or button not visible with the place method? - by deanhystad - Jan-03-2023, 03:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] cutomtkinter matplotlib no x,y - xaxis and x,y - labels-> only graph and grid visible dduric 0 365 Feb-20-2024, 07:09 PM
Last Post: dduric
  Place QT Window in the middle AlphaInc 10 2,424 Aug-03-2023, 05:40 PM
Last Post: Axel_Erfurt
Question [Tkinter] How to make split button? teknixstuff 2 1,110 Jan-03-2023, 06:21 PM
Last Post: Yoriz
  [PyQt] Determine whether text in QTableView cell is fully visible or not random_nick 0 1,020 Oct-27-2022, 09:29 PM
Last Post: random_nick
  [WxPython] [SOLVED] How to change button label? Winfried 3 2,149 May-31-2022, 06:37 PM
Last Post: Winfried
  [Tkinter] Make my button text update? Skata100 1 2,078 Aug-07-2021, 05:37 AM
Last Post: deanhystad
  Label.Place did not work? ATARI_LIVE 15 5,453 Sep-18-2020, 04:22 PM
Last Post: ATARI_LIVE
  [Tkinter] How to place scroll bar correctly scratchmyhead 1 3,993 May-18-2020, 04:17 PM
Last Post: scratchmyhead
  How to make button text bold in Tkinter? scratchmyhead 2 12,214 May-16-2020, 02:53 AM
Last Post: scratchmyhead
  How to use place holders in tkinter sqlite scratchmyhead 1 1,864 May-12-2020, 06:13 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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