CRM App With Treeview and SQLite3 - Tkinter Projects 16

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2024
  • In this video I'll show you how to use the Treeview Widget in Tkinter to build this cool CRM Database app.
    We'll use the Sqlite3 database for the project.
    We'll be able to add records, update records, delete records, move records, search records, and more.
    We'll also create a color changer tool that can modify the striped row colors in the treeview.
    #tkinter #codemy #JohnElder
    Timecodes
    00:00:00​​ - Introduction
    00:03:19 - CRM Treeview App
    00:26:50 - Add Functionality
    00:47:30 - Connect Treeview To Database
    01:04:14 - Primary Key
    01:15:20 - Update Record
    01:24:42 - Add New Record
    01:32:52 - Delete Single Record
    01:40:56 - Delete All Records
    01:52:05 - Delete Selected Record
    02:07:15 - Color Chooser
    02:19:55 - Search Database
    02:33:59 - Color Config File
    02:49:36 - Conclusion

ความคิดเห็น • 44

  • @TkinterPython
    @TkinterPython  ปีที่แล้ว +3

    ▶ Watch TTKBootstrap Playlist ✅ FREE Tkinter Widget Book
    bit.ly/3hphbwA bit.ly/3K4qlZC
    ▶ See More At: ✅ Subscribe To My TH-cam Channel:
    Tkinter.com bit.ly/3Pk1By4
    ▶ MASSIVE TKINTER.COM DISCOUNT ✅ Join My Facebook Group:
    30% off with coupon code: youtube bit.ly/2GFmOBz
    ▶ Get The Code For This Video ✅ Watch The 200 Video Tkinter Playlist
    bit.ly/3LQklWT bit.ly/3HAqZOd

  • @PascalChapier
    @PascalChapier 5 หลายเดือนก่อน +1

    Many thanks for this video, I learned a lot.
    If you are still looking for idea, you could add a sort function triggered when the user click in one treeview header:
    - first click in one header sort the record according to the colume content in ascending direction,
    - second click sort in descending direction and so on.
    - Click in a different header cell will restart by ascending sort for the new column selected.
    - The state is not preserved for the next program run.

  • @Rulzan
    @Rulzan หลายเดือนก่อน

    John, you're simply the best

  • @stevew9945
    @stevew9945 9 หลายเดือนก่อน +2

    excellent work, taught me a lot

    • @TkinterPython
      @TkinterPython  9 หลายเดือนก่อน +2

      Glad to hear it!

  • @pablo20237
    @pablo20237 ปีที่แล้ว

    Very excellent, thank you sir

  • @bigrevkev55
    @bigrevkev55 7 หลายเดือนก่อน

    You are the man!

  • @code-to-learn
    @code-to-learn 3 หลายเดือนก่อน

    Awesome tutorial sir

    • @TkinterPython
      @TkinterPython  3 หลายเดือนก่อน

      Glad you enjoyed it!

  • @biotyana945
    @biotyana945 ปีที่แล้ว

    thanks in advance ❤

    • @TkinterPython
      @TkinterPython  ปีที่แล้ว

      just define your treeview using ttkbootstrap, the rest is the same.

  • @digitalmachine0101
    @digitalmachine0101 4 หลายเดือนก่อน

    Good information

  • @JoaoNeto-oj9cn
    @JoaoNeto-oj9cn 11 หลายเดือนก่อน

    This data editing solution is very good, thank you very much for sharing these solutions. However, when it comes to DateEntry in the ttkboostrap package I can't get it to work. The date field does not show the record date and keeps the default date. The same happens with cleaning this field to edit a new record. What solutions can you suggest to solve this problem?
    Working dates in a database is not easy, at least for me.

  • @sadyaz64
    @sadyaz64 ปีที่แล้ว

    Thanks

  • @moris933
    @moris933 ปีที่แล้ว +1

    Thanks, great job. If you want I have more ideas for this channel, for example some applications when we can mark a place on Google maps and put some description for example for delivery company or interest place and share online. What you think?

  • @makhlouflazhar24
    @makhlouflazhar24 5 หลายเดือนก่อน

    Thanks in advance,
    I would like you to give us an example of extracting a PDF file from the database by exploiting data from the database

  • @biotyana945
    @biotyana945 ปีที่แล้ว +4

    can you do the same project with ttkbootstrap

    • @TkinterPython
      @TkinterPython  ปีที่แล้ว +1

      As I said in the video...use the exact same code, just define the treeview like we did in last week's video where I discussed ttkbootstrap's treeview.

  • @davidsbdavid7769
    @davidsbdavid7769 หลายเดือนก่อน

    Hi, good job. Is there a way to get the files used in the live?

  • @tomkmb4120
    @tomkmb4120 ปีที่แล้ว

    Is it possible to add numeric filtering to the columns in Tkinter?

    • @TkinterPython
      @TkinterPython  ปีที่แล้ว

      Sure

    • @tomkmb4120
      @tomkmb4120 ปีที่แล้ว

      @@TkinterPython Is that covered in a specific video?

    • @TkinterPython
      @TkinterPython  ปีที่แล้ว

      @@tomkmb4120 Not sure, it might be in this one somewhere, you can check the tkinter playlist on my codemy.com youtube channel

  • @vladmakrov8394
    @vladmakrov8394 8 หลายเดือนก่อน

    Nice job Sir. Thanks. Where can i find the source code?

    • @TkinterPython
      @TkinterPython  8 หลายเดือนก่อน

      pinned comment, as always

  • @manfredbaum2510
    @manfredbaum2510 9 หลายเดือนก่อน

    I do not find the code. Where is it. Excuse my bad english

    • @Codemycom
      @Codemycom 9 หลายเดือนก่อน

      It is linked in the pinned comment.

  • @lemartien25000
    @lemartien25000 5 หลายเดือนก่อน

    Invalid column index ???? When running this code I got the following error: Invalid column index. This happens in the treeview column definition. is this a problem in python interpreter I should reinstall python? I have version 3.12

    • @Codemycom
      @Codemycom 5 หลายเดือนก่อน

      No it's not a problem with python, you just messed up the code somewhere.

    • @lemartien25000
      @lemartien25000 5 หลายเดือนก่อน

      @@Codemycom import tkinter as tk
      from tkinter import ttk
      import sqlite3
      def afficher_resultats_requete(table_name):
      # Créer une fenêtre
      fenetre = tk.Tk()
      fenetre.title(f"Résultats de la requête pour la table {table_name}")
      # Établir la connexion avec la base de données
      conn = sqlite3.connect('agrements.db')
      cursor = conn.cursor()
      # Exécuter la requête SELECT *
      cursor.execute(f"SELECT * FROM {table_name}")
      rows = cursor.fetchall()
      # Créer un Treeview
      tree = ttk.Treeview(fenetre)
      # Configurer la colonne cachée (d'index)
      tree.column("#0", width=0, stretch=tk.NO) # Largeur à 0 pour la cacher
      tree.heading("#0", text="", anchor=tk.W) # Texte vide pour la colonne cachée
      # Configurer les colonnes en fonction du nom des colonnes dans le résultat de la requête
      for col_name in cursor.description:
      tree.heading(col_name[0], text=col_name[0])
      tree.column(col_name[0], width=100)
      # Insérer les données dans le Treeview
      for row in rows:
      tree.insert("", "end", values=row)
      # Ajouter le Treeview à la fenêtre
      tree.pack(expand=True, fill="both")
      # Démarrer la boucle principale
      fenetre.mainloop()
      # Appeler la fonction pour afficher les résultats pour la table 'nom_table'
      afficher_resultats_requete('nom_table')

    • @TkinterPython
      @TkinterPython  4 หลายเดือนก่อน

      I don't review code

  • @ken4edwards
    @ken4edwards ปีที่แล้ว

    where is the code?

    • @TkinterPython
      @TkinterPython  ปีที่แล้ว

      In the pinned comment, as always.

    • @ken4edwards
      @ken4edwards ปีที่แล้ว

      Thanks, I did no know about pinded comments and I did not know I would have to click show more to find it.

  • @MAH1MOUMA
    @MAH1MOUMA ปีที่แล้ว

    Thanks