This simple python program can be used to make FontChooser dialog in Tkinter Applications.

Overview

tkFontBox

This simple python program can be used to make FontChooser dialog in Tkinter Applications.

how to use?

  1. Copy the tkFontBox.py file into your current directory .
  2. In your python program, just import it like this.
    from tkFontBox import FontChooser
  3. In your python program of tkinter Application, wherever you want, create a method like this:
def getFont():
    global fc
    try:
        fc.deiconify()
    except Exception as e: #In the first open fontChooser window object have to be created.
        print(e)
        fc = FontChooser(root)#then, will have to open fontChooser again.
    def printFont():
        fn = fc.fontCombo.get()
        fs = fc.fontSizeCombo.get()
        txtbox.config(font=(fn,fs))
        fc.fontCombo.set(fn)
        fc.fontSizeCombo.set(fs)
##            
        fc.withdraw()
    
##        font = fc.getFont()
##        txtbox.config(font=font)
    fc.openFontDialog.config(command=printFont)

Here, getFont() method can be called by any of your TButtons,menus etc. to get the font family name and font size and use them. under printFont() method "fn" is the variable to get font name and "fs" for font size and "txtbox" (in line 20) is the tkinter textBox in which you may want to change the font name and size you selected.

I'm providing 2 files in this repo, 1. font_chooser_main.py 2. tkFontBox.py first file is the example program which is calling tkFontBox to use FontChooser window. Second is the file which is to be used to make FontChooser dialog box in your python programs using tkinter.

Main Window Example Program. image

FontBox Window ScreenShot. image

Affected main Window Text of textbox image

if you liked this repo,and it really helped you, and want to support me to make more repos. like this,
Subscribe our Youtube Channel : CID An Education Hub
~Thanks and Regards,
Pawan Kumar

Owner
Pawan Kumar Prachi
Being the one ,You desire.
Pawan Kumar Prachi
PyQt Custom Frameless Main Window (Enable to move and resize)

pyqt-custom-frameless-mainwindow PyQt Custom Frameless Main Window (Enable to move and resize) Requirements PyQt5 = 5.8 Setup pip3 install git+https:

Jung Gyu Yoon 1 Jan 13, 2022
Custom Widgets For PyQt5

pyqtCuWi Custom Widgets Icon Button Documentation Rank Widget Documentation PopUp OuterRadius PopUp Documentation OuterRadius Documentation Producer:

.CODE 0 Apr 04, 2022
A graphical user interface calendar with python

GUI-Calendar A graphical user interface calendar with python In this project I used tkinter module If you dont have tkinter module you can install it

Arone Sadegh 1 Dec 18, 2021
A lightweight file-copying interface.

autosort A lightweight file-copying interface. Preview What is autosort? Autosort is a lightweight file-copying interface. It allows you to copy sever

32 Jan 02, 2023
Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1-column txt file (1 taxonomy id for each file)

codon optimize cds paired with taxids singlefastas gui Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1

Olga Tsiouri 1 Jan 09, 2022
Redis GUI using Qt & Python

QRedis A Python, Qt based Redis client user interface. Help wanted Open to people who want to colaborate. Would like to know which features you would

Tiago Coutinho 58 Dec 09, 2022
A little Python library for making simple Electron-like HTML/JS GUI apps

Eel Eel is a little Python library for making simple Electron-like offline HTML/JS GUI apps, with full access to Python capabilities and libraries. Ee

Chris Knott 5.4k Jan 07, 2023
Primeira interface (simples) desenvolvida em Python utilizando o PySimpleGUI

Interface-Python Sobre o projeto Primeira interface gráfica (simples) desenvolvida em Python utilizando o PySimpleGUI Interface Gráfica Tecnologias ut

Matheus Maia Alvarez 5 Apr 09, 2022
An qt asset browser for applications like houdini/nuke/maya/blender

AssetBrowser A qt asset browser for applications like houdini/nuke/maya/blender Currently in development Note: Only houdini plugin available during de

Jonas Sorgenfrei 6 Aug 05, 2022
All you need to learn Tkinter!

Tkinter This repository contains the codes and resources which I used to learn the standard GUI library of Python, Tkinter! Best Tkinter Resources Vid

Samyak Jain 3 May 02, 2022
GUI for Volatility forensics tool written in PyQT5

Volatility GUI This is a GUI for Volatility forensics tool written in PyQT5 Prerequisites: 1- Installed version of Volatility. 2- Install PyQT5. sudo

Hamza Megahed 52 Jun 18, 2022
Create shortcuts on Windows to your Python, EXE, Batch files or any other file using a GUI made with PySimpleGUI

shor Windows Shortcut Creation Create Windows Shortcuts to your python programs and any other file easily using this application created using PySimpl

PySimpleGUI 7 Nov 16, 2021
Easily display all of your creative avatars to keep them consistent across websites.

PyAvatar Easily display all of your creative avatars to keep them consistent across websites. Key Features • Download • How To Use • Support • Contrib

William 2 Oct 02, 2022
Bill Cipher is a Python3 Tkinter Application that creates Python remote backdoors, while giving you the option to convert it to an exe.

Bill Cipher is a Python3 Tkinter Application that creates Python remote backdoors, while giving you the option to convert it to an exe. The program also configures a .py server file that works with t

Damian Mostert 2 Apr 12, 2022
`rosbag filter` with Gooey-based GUI

rosbag_filter_gui rosbag filter with Gooey-based GUI Test-passed Ubuntu 20.04 ROS Noetic Python 3.8 Installation

Yujie He 2 Dec 07, 2021
Basic browser based on PyQt5

goneDev-browser "basic browser based on PyQt5" This application is primarily built on macOS with more adaptibility for MacOS than Windows. v1.0 will s

Harsh ADV) 1 Jan 19, 2022
python+PySimpleGUI+pyserial+threading

GUI_pyserial python+PySimpleGUI+pyserial+threading 功能 1.利用PySimpleGUI制作图形用户界面 2.利用threading实现多线程调用pyserial处理串口通信 模块版本 PySimpleGUI 4.46.0 pyserial 3.5

2 Dec 27, 2022
A GUI panel to manage multi monitor on i3wm.

Monitor manager Only for I3wm (Just for now) It's about two years that I'm using i3 as my window manager and in my experience this window manager allo

Wire.Nemo 3 Nov 06, 2021
ZFS Administration GUI

ZYGGY ZFS Administration GUI Zyggy is a very simple GUI for basic ZFS administration. The system provides graphical access for most frequently used ZF

51 Dec 18, 2022
This repository contains some projects that I have done using Python + Tkinter.

This repository contains some projects that I have done using Python + Tkinter.

João Victor Vilela dos Santos 1 Nov 10, 2021