Help with Button Text Visibility in Tkinter Application

0
1
Asked By TechyNinja42 On

I'm having trouble with my Python code while working on a hospital management system using Tkinter. The text on my buttons isn't showing up, and I'm not sure what's going wrong. I've been following a tutorial I found on YouTube to rebuild this application, but I can't seem to locate the mistake I've made. Any insights or suggestions would be greatly appreciated! You can also check out my project on GitHub if needed.

3 Answers

Answered By OmarHashem28 On
Answered By CodeWhisperer99 On

I can't pinpoint the issue right now since I'm on my phone, but have you tried checking if the button text appears when you hover over or click the button? Also, switching the text and background colors to simple options like black and white might help you debug. Another tip is to create a font object once and use it across all buttons—this way, any changes you make will apply everywhere. Check out this snippet:
```python
button_font = tkinter.font.Font(family="Times New Roman", size=12, style="bold")
```

OmarHashem28 -

Unfortunately, even when I hover or click on the buttons, nothing appears. I've tried changing the colors to 'white' text on a 'green' background, but it still doesn’t work.

Answered By HelpGuru89 On

Could you share the link to the tutorial you’re following? That might help others understand the context better.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.