UI/UX Designعربى

Building User Interfaces with Python Tkinter

A complete guide to developing graphical user interfaces

Design windows, buttons and menus for Python programs with Tkinter, then try Kivy for touch interfaces.

4.5(57)154 pages5 chapters57 views

What you'll learn

  • Use the core widgets: Button, Label, Entry, Frame and Listbox
  • Create menus, radio buttons, scrollbars and scales
  • Work with Text, Spinbox, PanedWindow and LabelFrame
  • Show information, warning, error and question dialogs with message boxes
  • Build the Python Web Blocker and deploy it on Linux and Windows
  • Understand the Kivy architecture, install it and write a Hello World program
  • Use Kivy widgets such as buttons, sliders and progress bars
  • Arrange elements with Kivy layouts and create a login window

About this book

This book explains the Tkinter library for building graphical user interfaces in Python, widget by widget. It starts with the basic widgets such as Button, Canvas, Checkbutton, Entry, Frame, Label and Listbox, then Menu, Message, Radiobutton, Scale and Scrollbar, then Text, Toplevel, Spinbox, PanedWindow, LabelFrame and message boxes.

Next it presents a hands-on project, the Python Web Blocker, which blocks chosen websites through the hosts file and is deployed on Linux and Windows. It closes with the Kivy library: what it is, its features, its architecture and installation, then a Hello World program, buttons, widgets, layouts, a popup window and a login window.

The book suits readers who know the basics of Python and want to turn command-line programs into windowed apps. By the end you will be able to build a program with windows, buttons, menus and alert dialogs.

Who this book is for

  • Python programmers who want a graphical interface for their programs
  • Programming students building a project with windows and buttons
  • Developers who want to get to know Kivy for touch interfaces
  • Hobbyists who want a small, easy-to-use tool of their own
  • Teachers looking for examples to teach GUI programming

Why read this book

  • An explanation of every Tkinter widget with its methods
  • A full hands-on project, the Python Web Blocker
  • Two libraries, Tkinter and Kivy, covered in one book
  • Message boxes explained, such as showinfo, askyesno and askretrycancel

Reader reviews

These reviews are from readers who own the book — through purchase or as part of their subscription.
4.5
★★★★★
57 reviews
5★
31
4★
26
3★
0
2★
0
1★
0

    Table of contents

    1

    الفصل الأول

    1. أساسيات Tkinter
    2. زر Python Tkinter
    3. Python Tkinter Canvas
    4. زر الاختيار من Python Tkinter
    5. الأساليب
    6. دخول Python Tkinter
    7. طرق أداة الدخول
    8. إطار Python Tkinter
    9. تسمية Python Tkinter
    10. Python Tkinter Listbox
    11. الأساليب
    2

    الفصل الثاني

    1. Python Tkinter Menubutton
    2. قائمة Python Tkinter
    3. الأساليب
    4. إنشاء قائمة المستوى الأعلى
    5. رسالة Python Tkinter
    6. Python Tkinter Radiobutton
    7. الأساليب
    8. مقياس Python Tkinter
    9. شريط تمرير Python Tkinter
    3

    الفصل الثالث

    1. نص Python Tkinter
    2. الأساليب
    3. طرق معالجة العلامات
    4. طرق معالجة العلامات
    5. Tkinter Toplevel
    6. الأساليب
    7. Python Tkinter Spinbox
    8. الأساليب
    9. Tkinter PanedWindow
    10. الأساليب
    11. Tkinter LabelFrame
    12. صندوق رسائل Tkinter
    13. المعايير
    14. إظهار المعلومات()
    15. إظهار التحذير()
    16. showerror()
    17. askquestion()
    18. askokcancel()
    19. askyesno()
    20. askretrycancel()
    4

    الفصل الرابع

    1. Python Web Blocker
    2. مقدمة
    3. الهدف
    4. العملية
    5. ملف hosts
    6. موقع ملف المضيفين
    7. التكوين
    8. المتطلبات
    9. بناء البرنامج النصي python
    10. إعداد الحلقة اللانهائية
    11. تحديد الوقت
    12. الكتابة إلى ملف المضيّفين
    13. إزالة من ملف hosts
    14. البرنامج النصي النهائي
    15. نشر البرنامج النصي على نظام Linux
    16. الإجراء
    17. نشر البرنامج النصي على Windows
    5

    الفصل الخامس

    1. Kivy
    2. شرح كيفي التعليمي
    3. ما هو Kivy ؟
    4. ميزات Kivy
    5. الفيديو
    6. للمس المتعدد والإيماءات
    7. ميزات واجهة المستخدم
    8. المؤثرات البصرية و OpenGL
    9. المرونة
    10. مجاني
    11. مزايا وعيوب Kivy
    12. المزايا
    13. العيوب
    14. بنية Kivy
    15. المُزوّدات الأساسيّة ومزوّدات الإدخال
    16. الرسومات
    17. النواة
    18. UIX
    19. الوحدات النمطية
    20. أحداث الإدخال
    21. الأدوات وإرسال المدخلات
    22. تثبيت Kivy على Windows
    23. تثبيت Kivy
    24. إنشاء برنامج Hello World في Kivy
    25. إضافة أداة الصورة في Kivy
    26. من النظام
    27. التحميل غير المتزامن
    28. أزرار Kivy
    29. إنشاء زر مميز
    30. إضافة صورة في الزر
    31. أدوات Kivy Widgets
    32. المنزلق
    33. أداة التبديل
    34. شريط التقدم
    35. تخطيطات Kivy
    36. تخطيط الشبكة
    37. تخطيط الصندوق
    38. التخطيط العائم
    39. تخطيط المرساة
    40. StackLayout
    41. إنشاء نافذة منبثقة في Kivy
    42. إنشاء نافذة تسجيل دخول في Kivy
    43. المتطلبات الأساسية
    44. الجمهور
    45. المشكلة
    46. القائمة المدرجة في كيفي

    Related books