Abid Mehmood
Abid Mehmood

Reputation: 23

How To Bold, Italic And Underline The Same Selected Text in Python Tkinter?

I created three different buttons in my program under the menu. Each of the button can perform their functions perfectly. However,when I bold an underlined text, the text will set to underline without bold. My problem is the selected text can only perform one selected style.How can I retain the previous style of the word and adding the new style?

Upvotes: 1

Views: 2724

Answers (1)

Maifee Ul Asad
Maifee Ul Asad

Reputation: 4607

Try :

tkFont.Font(family="font_name", font_size=10, weight=tkFont.BOLD,
        slant=tkFont.ITALIC)

You can see more at.

Upvotes: 4

Related Questions