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
Custom GUI for your Blender add-ons using Dear ImGui

Dear Imgui for Blender Use the infamous Dear ImGui library directly in your Blender scripts! This means custom GUI drawing in your operators: Normally

Elie Michel 83 Dec 25, 2022
Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies

(This library is available under a free and permissive license however, if you Enjoy Dear PyGui please consider becoming a Sponsor) Dear PyGui is a si

Jonathan Hoffstadt 9.4k Jan 07, 2023
A Simple GUI application to organize and store accounts/passwords.

PyssView A Simple GUI application to organize and store accounts/passwords. Install/Run (Linux) Via script This way will install a binary version and

Jefferson Richard Dias 1 Nov 24, 2021
Cross-platform BrowserViews for the desktop.

Webview We use wxPython Phoenix to provide webviews. It's cross platform between Windows and macOS primarily, Linux versions require extra setup. Appl

1 Feb 12, 2022
PyQT5 app for LOLBAS and GTFOBins

LOLBins PyQT app to list all Living Off The Land Binaries and Scripts for Windows from LOLBAS and Unix binaries that can be used to bypass local secur

Hamza Megahed 41 Dec 01, 2022
GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings

warp-cli-gui GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings. Description Python program that will int

Danie 6 Nov 01, 2022
Declarative User Interfaces for Python

Welcome to Enaml Enaml is a programming language and framework for creating professional-quality user interfaces with minimal effort. What you get A d

1.4k Jan 07, 2023
This is the new and improved Plex Automatic Pre-roll script with a GUI

Rollarr This is the new and improved Automatic Pre-roll script with a GUI for Plex now called Rollarr! It should be stable but if you find a bug pleas

164 Nov 04, 2022
A hotkey manager that runs in the system tray. Uses PySimpleGUI for the GUI and the system tray.

PySimpleHotkey PySimpleHotkey A hotkey manager that runs in the system tray. Uses PySimpleGUI for the GUI and the system tray. Packages Used This proj

PySimpleGUI 20 Nov 14, 2022
Tukaan is the new framework that aims to replace Tkinter

Tukaan is the new, pythonic and colorful (like a keel-billed toucan) framework that aims to replace Tkinter. It has everything (on my computer, not at GitHub) that you need to develop cross-platform

Tukaan 101 Jan 08, 2023
Introduce QML-like declarative structure to Python world. Developer writes only pure Python code for QML.

Introduce QML-like declarative structure to Python world. Developer writes only pure Python code for QML.

likianta 4 Mar 27, 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
Python Screen Recorder using Python

PY-Screen-Recorder Python Screen Recorder using Python Requirement: pip install cv2 pip install pyautogui pip install numpy How to reach me? You can r

SonLyte 8 Nov 08, 2021
Kivy is an open source Python framework for creating cross-platform multi-touch mobile applications with Natural User Interface.

Kivy is an open source Python framework for creating cross-platform multi-touch mobile applications with Natural User Interface.

Grace Ugochi Nneji 3 Feb 15, 2022
UberGui is a lightweight multi-threaded, webRender UI module for TouchDesigner

UberGui V4 UberGui is a lightweight multi-threaded, webRender UI module for TouchDesigner projects. The aim is to solve the trifecta of challenges bui

LUCAS M MORGAN 48 Nov 20, 2022
A GUI Based Figlet Maker

Figlet Creation Create Figlets easily using this application created using PySimpleGUI. Installation Old-school Straight Pip pip install psg-figlet pi

PySimpleGUI 8 Jan 06, 2023
Create highly interactive web pages purely in Python

A package for building highly interactive user interfaces in pure Python inspired by ReactJS.

701 Jan 03, 2023
GUI based app made in python using tkinter

Virtual Keyboard A GUI application made in python using tkinter This is my first ever proper GUI based application project after learning tkinter rece

AbhineetK 10 Dec 10, 2022
TkArt - A repository created to explore geometry and art creation using TkInter

tkArt A repository created to explore geometry and art creation using TkInter, a

Jayant Sogikar 18 Oct 01, 2022
This program is written in python. It will help you find a valid solution for a sudoku puzzle.

Sudoku-Solver-Using-Tkinter This program is written in python. It will help you find a valid solution for a sudoku puzzle. Requirements: Python3 IDLE

Ankan Mahapatra 3 Oct 02, 2021