GUI – Basic Notes
1. What is GUI?
GUI (Graphical User Interface) is a user interface that allows users to interact with a
computer using windows, icons, menus, buttons, and dialog boxes instead of typing
commands.
Example: Windows OS, Android apps, Calculator app
2. GUI vs CLI
• GUI: Uses graphics, easy to use, mouse-based
• CLI (Command Line Interface): Uses text commands, keyboard-based
3. Features of GUI
• User-friendly
• Easy navigation
• Uses mouse and keyboard
• Visual components
• Interactive
4. Common GUI Components
• Window: Main screen area
• Button: Click to perform action
• Label: Displays text
• Text Box: Input text
• Menu: List of options
• Dialog Box: Popup message or input window
5. Advantages of GUI
• Easy to learn
• No need to remember commands
• Attractive and interactive
• Reduces user errors
6. Disadvantages of GUI
• Requires more memory
• Slower than CLI
• Needs graphics support
• Complex to develop
7. GUI in Python
Python supports GUI programming using libraries like:
• Tkinter (most common)
• PyQt
• wxPython
• Kivy
8. Tkinter (Python GUI Library)
• Built-in Python library
• Used to create desktop applications
• Supports buttons, labels, entry boxes, etc.
Example:
from tkinter import *
root = Tk()
[Link]()
9. Event-Driven Programming
GUI works on events like:
• Mouse click
• Key press
• Window close
10. Applications of GUI
• Desktop software
• Mobile apps
• Banking systems
• Educational software
• Websites