Skip to content

1. Basics

watakak edited this page Feb 24, 2024 · 6 revisions

Installation

To install, type pip install freshgui

WARNING! Before read any of documentation, make sure that you're using version 0.6.5

Creating a Window

Basic blank window

import freshgui as window #importing module itself

window.create() #creating a blank window

window.run() #runs a window

It's highly recommended to set import freshgui as window, or fgui. There is no reason for that, but visually it's just better to use.

Basic Create() Parameters

window.create(name='Example', icon='example.ico', size='600x500', resizable=False)
  • name: Name of the Window, or set to None for not display.
  • icon: Requires path to .ico, or set to None for not display.
  • size: The Size of the Window.
  • resizable: Allows to change the size of the Window manually. True = allowed, False = isn't allowed.

Window Settings

import freshgui as window #importing module itself

window.settings(theme='Dark', debug=True, language='English') #select the settings for the window/project

window.create() #creating a blank window

window.run() #runs a window

settings() contains 3 Parameters, theme, debug and language.

  • theme: Select preset theme for the whole project. Avaiable: "Light" (default), "Dark"
  • debug: Debugging/logs system, useful for errors in code. True for Enable, False for Disable.
  • language: Language system, mostly used for Debugging system. Avaiable: "English" (default)

Warning! Settings option must be before the Window Create.

image

Clone this wiki locally