Build a CRM Tool With Treeview And Database - Python Tkinter GUI Tutorial

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 150

  • @Codemycom
    @Codemycom  3 роки тому +3

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My UA-cam Channel:
    bit.ly/2UFLKgj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/395TamW

  • @robfowler2691
    @robfowler2691 Рік тому

    Wow. I've been wanting to build a desktop-based database GUI with Python for years. This is the first clear, straightforward tutorial I've seen yet on how to do this with Tkinter. I've messed around with other GUI builders like wxPython, Qt, etc. but these are encumbered by installation and licensing hassles. Since Tkinter is already part of Python, I always wished I could use it for this purpose, but until recently it seemed like the documentation and learning resources for it were paltry. Thank you!

  • @darklord2512
    @darklord2512 Рік тому +1

    I really loved your videos on tkinter. It would have taken me years to learn as much as I could learn within a week. Cheers!

    • @Codemycom
      @Codemycom  Рік тому

      Glad you're enjoying them!

  • @MorbidPasta
    @MorbidPasta 2 роки тому

    I was a CRM developer using PHP who's relearning python now and this made for an interesting video!

  • @criblaj
    @criblaj 3 роки тому +2

    love your positive way of teaching ! thank you so much :)

  • @mcourbis
    @mcourbis 5 місяців тому

    You have saved me from bashing my head right through my screen. The only thing I cannot seem to make work is the stripes, when I put the iid=count it always says that item 0 already exists and crashes, I can make it work without the iid argument though, if you can give me some advice on that I would appreciate it, if not, I understand that you might receive a lot of help requests like mine so no biggie.
    Thanks one again, your tutorials are the best and your attitude towards teaching is top notch as well

    • @Codemycom
      @Codemycom  5 місяців тому

      Sorry, all I can suggest is to put your code aside for a few days and then look at it with fresh eyes to discover what you did differently from the video..

  • @askquestionstrythings
    @askquestionstrythings 2 роки тому +3

    Why use Global count? can't you can get a count directly from the for in command?
    Would the foillowing work with out the "evil global" count?
    for idx, values in enumerate(data):

  • @MoltiSanti
    @MoltiSanti 3 роки тому

    I had a project planned that this could almost be directly applied to in order to get me started. Thanks for reading my mind.

  • @benmyg
    @benmyg 3 роки тому +4

    I've been working on something like this for the past couple of weeks, so having this video has literally made my day! I've already got the database link working after a ton of other research but looking forward to when the next video is coming. When will the next one be released, is it a weekly thing?

    • @Codemycom
      @Codemycom  3 роки тому +2

      Yeah I do Tkinter every Tuesday

    • @benmyg
      @benmyg 3 роки тому

      @@Codemycom hello, will the next video been released soon?

    • @Codemycom
      @Codemycom  3 роки тому +1

      @@benmyg I've had a family emergency and will be out of town for a bit. New videos are on hold till I return, hopefully soon.

    • @benmyg
      @benmyg 3 роки тому

      @@Codemycom Hello John. Will the next video be up soon? I was following this tutorial for a similar project I've been set which would help me save a lot of time. I hope everything is ok with your family and look forward to part 2.

    • @Codemycom
      @Codemycom  3 роки тому +1

      @@benmyg I hope to resume regular schedule next week.

  • @robertzielinski4291
    @robertzielinski4291 9 місяців тому

    thx for your contribution! You stuff is great! One question: why my:
    my_tree.tag_configure('oddrow', background="white")
    my_tree.tag_configure('evenrow', background="lightblue")
    does not work properly? MacBook Pro, Sonoma 14.3 - there is one color of rows just! Do you have idea what is going on?

  • @experimentaleszeug2350
    @experimentaleszeug2350 Рік тому

    Struggling right now with TWO (or more) treeviews with stuff in one app. Don't mind the the layout. Each of them keeps their HIGHLIGHTED selection after switching frames. Found nothing helpful on the web. Bindings on TreeviewSelect or some controller class made it even worse. Thank you for your entertaining and informative content. Always an excellent show.

    • @experimentaleszeug2350
      @experimentaleszeug2350 Рік тому

      Lost almost three days over this issue. The whole project was in danger. Could it be a show stopping tkinter-bug? Unlikely,. Am I too stupid? Probably. Average noob, I would say. In the end, I've learned something. 😀 And I wouldn't have gotten this far without your help. Keep up your good work. 👍

  • @donizeteaugustini2575
    @donizeteaugustini2575 3 роки тому

    thanks a lot, From São Paulo/Brasil

  • @SURYA_M07
    @SURYA_M07 3 роки тому +2

    It's very informative ..👍

  • @jbt8903
    @jbt8903 Рік тому

    Love the Video extremely helpful, one question, I want to display more than 10 rows in the Treeview table, I am unable to find what is restricting the display to 10 rows, I wanted to increase it to like 20 or so. Mind helping a newbie out? Been over the code many times, top to bottom and bottom to top. not finding it.

    • @Codemycom
      @Codemycom  Рік тому

      As far as I know, there's nothing in treeview that stops at 10 rows. You can by default have more than that. So there's something wrong with your code...I mean, we have more than 10 in the video above and you can clearly see I didn't do anything to make that happen besides what's in the video.

    • @jbt8903
      @jbt8903 Рік тому

      @@Codemycom Finally figured it out, Apparently Treeview defaults to display 10 rows, I added Height=15 and it worked. Guess you have to override the default.

  • @blendermonke
    @blendermonke 3 роки тому +1

    I made app for my mom using what I was taught today c: .She liked it. Kinda difficult to make y'all understand what it was about.

  • @hosseinroosta5154
    @hosseinroosta5154 3 роки тому

    You deserve the best. Thnks ❤❤❤

  • @cuervodeburzaco
    @cuervodeburzaco 3 роки тому

    Gracias, From Argentina!

  • @ibrahimibo95
    @ibrahimibo95 2 роки тому

    You are a wonderful person i love you

  • @fernandomartino4708
    @fernandomartino4708 Рік тому

    is there a way to dinamically set the width of the columns in the treeview widget?

  • @akifemekli6993
    @akifemekli6993 3 роки тому

    That's great. Thank you
    What should i do for calling data from an external database, how should I call it into the treeview? Is there any suggestions?

    • @Codemycom
      @Codemycom  3 роки тому

      Yeah, as I said in this video...I'll discuss that in the next video...

  • @darshanpanchal3046
    @darshanpanchal3046 3 роки тому +1

    Fantastic

  • @maroctechno1234
    @maroctechno1234 3 роки тому

    GOOD JOB TEACHER

  • @ramirovaldes4889
    @ramirovaldes4889 3 роки тому

    this is incredible, thank you

  • @hemalakshmi1531
    @hemalakshmi1531 3 роки тому

    Sir can you please tell me which application you are using for coding..
    Thank you in advancr

    • @Codemycom
      @Codemycom  3 роки тому +1

      Sublime text editor and git bash terminal from git-scn.com

  • @dohnot
    @dohnot 3 роки тому

    Great video and explains

  • @Владимир-в1б3ш
    @Владимир-в1б3ш 3 роки тому

    this is a cool application

  • @masekin
    @masekin 2 роки тому

    Awesome! Thank you :)

  • @viniciusRocha-v8j
    @viniciusRocha-v8j 4 місяці тому

    hi, i've looking for a way to better custom my treeviw, here i found a way to improve it but not reach where i wana arave, unfortunatly the ctk dont have its own kind of treeview, and the documentation of Tkinter and ttk is really bad, do you know where should i look for?

  • @Alexey_757
    @Alexey_757 2 роки тому

    Thank you, огромное спасибо!!

  • @robfowler2691
    @robfowler2691 Рік тому

    Thanks!

  • @JeanCALUDE
    @JeanCALUDE Рік тому

    Hi John, first thanks a million for this awesome tutorial !
    I need to do the same thing but as a Web App. What would you suggest ?
    I would like to stick with Python and Mysql now I know those languages thanks to you :-)
    I'm ready to pay you if you would accept to do a step by step channel about this topic, like you did with the CRM with Tkinter.

    • @Codemycom
      @Codemycom  Рік тому

      I suggest Django. I don't have any plans to do a step by step on it tho at the moment. You can email me at john@codemy.com about it.

  • @kokorospirit5006
    @kokorospirit5006 3 роки тому

    Good video! Thanks!

  • @laurentreynaud4404
    @laurentreynaud4404 3 роки тому

    Thank you very much !

  • @cheikhsadibousidibe1434
    @cheikhsadibousidibe1434 2 роки тому

    great content

  • @doggchico
    @doggchico 3 роки тому

    Thanks a lot!!

  • @nihalthannegedarapremaratn2352
    @nihalthannegedarapremaratn2352 3 роки тому

    Great... Thanks a lot..

  • @he4-f2e
    @he4-f2e 3 роки тому

    thank you sura gean

  • @AmanMagic466
    @AmanMagic466 3 роки тому

    Hi, what did you set in yscrollcommand? yscrollcommand=tree_scroll.set()

    • @Codemycom
      @Codemycom  3 роки тому

      yscrollcommand=tree_scroll.set

  • @parthghughriwala6799
    @parthghughriwala6799 3 роки тому

    Great, thanks

  • @yaokouadioalexis6876
    @yaokouadioalexis6876 3 роки тому

    Hello John ELDER. I want to know if there is a mean to connect python with an access file. Thank you.

    • @Codemycom
      @Codemycom  3 роки тому

      Yes there is but I don't have any videos on that. You need a third party thing like pyodbc or something like that

  • @sithuhtun3609
    @sithuhtun3609 3 роки тому

    Awesome!!!

  • @akarshgupta2586
    @akarshgupta2586 3 роки тому

    can you help in the entry widget. There is a parameter 'show' whcih replaces the characters with the specified character. but how do we configure it to change back to show the original characters?

  • @FoodKannadaVlog
    @FoodKannadaVlog 3 роки тому

    sir, I created the Tkinter software with a database(sqlite3).
    I install the software on the two computers.
    if I update the some recorded in the one computer it automatically updates that recorded in the other computer.
    how to make that software in Tkinter. please tell me any extras library are needed.

    • @FoodKannadaVlog
      @FoodKannadaVlog 3 роки тому

      please tell me if it is possible in Tkinter or not

    • @Codemycom
      @Codemycom  3 роки тому

      @@FoodKannadaVlog Sure, you just need to use a database online instead of one locally. My latest video shows you how:
      ua-cam.com/video/fRrR3shjFVY/v-deo.html

  • @codeKeshav
    @codeKeshav 3 роки тому

    Can't we do all these things without using tree view function i.e we can do via listboxes

  • @sportiano3348
    @sportiano3348 2 роки тому

    how can i change treeview color for programm allready exists?

    • @Codemycom
      @Codemycom  2 роки тому

      Is it your program that you wrote? If so, easily and I have videos for that.

  • @hiwab41
    @hiwab41 3 роки тому

    Nice video!

  • @daviking-88
    @daviking-88 3 роки тому +1

    when i run the program before making trhe entry boxes, i get the following error:
    traceback (most recent call)
    File"home/pi/Desktop/"crmtreebase.py", liine 68, in
    ["eva", "Kingsley", 2, "123 anywhere st.", "anywhere", "LA", "12345"]
    typeerror: list indices must be integers or slices, not tuple
    How do i fix this?

    • @johne7444
      @johne7444 3 роки тому +1

      I had the same problem, for me adding a comma at the end (after bracket) of all but the last row in the fake data made it work, I suspect that is how the fake data is setup but can't see it in the video as that edge is cutoff

  • @frazer26
    @frazer26 3 роки тому

    Have you a video on scroll bars on canvas? Had a look on the play list but couldn’t see

    • @Codemycom
      @Codemycom  3 роки тому

      Yeah it's in there...you can always put the canvas in a frame and scroll the frame too.

    • @frazer26
      @frazer26 3 роки тому

      @@Codemycom thanks, my goal is I have about 150 radio buttons and I can scroll them in a frame. On my pc it’s ok because of my screen resolution but on my older laptop because my resolution is low, it misses the lower options

  • @DavidMurphy-pg9rp
    @DavidMurphy-pg9rp Рік тому

    Really like your video Build a CRM Tool With Treeview And Database - Python Tkinter GUI Tutorial, but I'm having trouble getting the CRM tool to run .
    The line "# Create Headings, my_tree.heading("#0",width = 0, stretch =NO) fails to compile with an error: unknown option "-width". This is odd because the line: my_tree.column("#0",width = 0, stretch =NO), works fine?
    Any Idea why this is happening?
    Second question: I get an error from the line: root.iconbitmap('c:/gui/codemy.ico'), how do I access the file 'c:/gui/codemy.ico'),
    Hope you can help I kinda jumped in to the middle of your videos and I'm sure you have explained these issues in one of your earlier videos.

    • @Codemycom
      @Codemycom  Рік тому

      lines that start with # are comments. They are ignored by python. So that line isn't the problem.

    • @DavidMurphy-pg9rp
      @DavidMurphy-pg9rp Рік тому

      I ran into another error I don't know how to handle. in the lines:
      for record in data:
      if count % 2 == 0:
      my_tree.insert(parent= '', index='end', iid=count, text='', values=(record[0], record[1], record[2], record[3], record[4], record[5], record[6]),tags=('evenrow',))
      else:
      my_tree.insert(parent= '', index='end', iid=count, text='', values=(record[0], record[1], record[2], record[3], record[4], record[5], record[6]),tags=('oddrow',))
      I am getting IndexError: string index out of range.
      I have no clue how to fix this error. Any suggestions?

  • @Discodave676
    @Discodave676 3 роки тому

    How would you then out this data in a GUI? So if you had cars in a carpark, you could input the data in this format, then it would show you a map of where they were?

    • @Codemycom
      @Codemycom  3 роки тому

      This is a GUI, not sure what you mean...

    • @Discodave676
      @Discodave676 3 роки тому

      @@Codemycom So like assign them a location on a map for example, then output that into a GUI.

    • @Codemycom
      @Codemycom  3 роки тому +1

      @@Discodave676 lots of ways to do that, but I don't have any videos on maps.

    • @Discodave676
      @Discodave676 3 роки тому

      @@Codemycom Ok thanks for the feedback! A drag and drop>database>parking lot management system would be a good one if you want any ideas!

  • @AtlanticWarrior
    @AtlanticWarrior 3 роки тому

    Is there a part 2 for this tutorial ? ❤️🙏

    • @Codemycom
      @Codemycom  3 роки тому +2

      yeah coming soon, tkinter videos come on Tuesdays

  • @jensen_9393
    @jensen_9393 3 роки тому

    get the code at github.com/flatplanet/Intro-To-TKinter-UA-cam-Course/blob/master/treebase.py

  • @akankshaubale6491
    @akankshaubale6491 3 роки тому

    John sir, How to take the Thumbnail image of mp3 song in tkinter window, Please tell us.

    • @Codemycom
      @Codemycom  3 роки тому

      I have videos on the playlist showing how to add images.

  • @Shreyas_Bodani_29
    @Shreyas_Bodani_29 2 роки тому

    It is not adding records can you help?

    • @Codemycom
      @Codemycom  2 роки тому

      You’ll have to rewatch the videos and figure out what you left off.

  • @paullong4086
    @paullong4086 3 роки тому

    Does anyone know how to print to a printer from tkinter. A friend of mine wants to make a check register program and to print checks on his printer. I've searched all over the internet, but I can't find anything.

    • @Codemycom
      @Codemycom  3 роки тому

      I think I have a video on basic print stuff on the playlist here

    • @paullong4086
      @paullong4086 3 роки тому

      @@Codemycom Thanks. Do you which video it is in? I looked through the playlist but nothing popped out at me about working with printers.

    • @paullong4086
      @paullong4086 3 роки тому

      @@Codemycom I found the tutorial (111). I use Linux so I don't think win32api will work for me. Very nice tutorials just the same, Thanks again.

    • @Codemycom
      @Codemycom  3 роки тому

      @@paullong4086 I'd maybe try the one called "Print A File - Build A Text Editor Part 8 - Python Tkinter GUI Tutorial #111"
      ua-cam.com/video/gkWtBrVq3W8/v-deo.html

    • @Felledk
      @Felledk 3 роки тому

      Maybe make a hotfolder on desktop that is setup to print any file there, then make a python function to make a pdf in that folder with your content (look at reportlab for this)

  • @amorettais7969
    @amorettais7969 3 роки тому

    Ahhh can anyone help, I know the ‘data’ part isn’t data that’s gonna be used, but I keep getting an error when it comes to the for loop, ‘NameError: name ‘data’ is not defined’.
    I don’t know how to fix it :(

  • @journeytowardscoding7620
    @journeytowardscoding7620 3 роки тому

    Sir please show how to print that data by printer connection . request sir

  • @learnwithnawf246
    @learnwithnawf246 3 роки тому

    today second view

  • @anilthakur8988
    @anilthakur8988 3 роки тому

    How to focus in treeview
    please tell me sir

    • @Codemycom
      @Codemycom  3 роки тому

      just click on it, right?

    • @anilthakur8988
      @anilthakur8988 3 роки тому

      @@Codemycom sir i need auto focus by default

    • @Codemycom
      @Codemycom  3 роки тому

      @@anilthakur8988 widget_name.focus_set()

    • @anilthakur8988
      @anilthakur8988 3 роки тому

      @@Codemycom sir create video auto focus in treeview widget please

    • @Codemycom
      @Codemycom  3 роки тому

      @@anilthakur8988 I already told you how to do it. That one line of code is all you need

  • @arunbeckham8384
    @arunbeckham8384 3 роки тому

    When will you upload next video john(Walter white) :P?

    • @arunbeckham8384
      @arunbeckham8384 3 роки тому

      I am getting error in line 24. Could you please help me out?
      self.tk.call(self._name, "map", style, *_format_mapdict(kw)),
      _tkinter.TclError: Invalid state name *

    • @Codemycom
      @Codemycom  3 роки тому +1

      When I return from my family emergency

    • @arunbeckham8384
      @arunbeckham8384 3 роки тому

      @@Codemycom I am getting error john. Could you please help me out.....?

  • @moris933
    @moris933 3 роки тому

    maybe" Build a CRM Tool With Treeview And Database " + SQLite xD

    • @Codemycom
      @Codemycom  3 роки тому +1

      yeah we'll be using sqlite as the database

  • @videosincoming6850
    @videosincoming6850 3 роки тому

    No Tkinter anymore ?? 😥

    • @Codemycom
      @Codemycom  3 роки тому

      I'm out of town on a family emergency, they will resume when I return

  • @waitwhat7164
    @waitwhat7164 2 роки тому

    style = ttk.Style() opens a new empty window.

  • @maroctechno1234
    @maroctechno1234 3 роки тому

    HELLO TEACHER WE WAIT A NEXT VIDEO #173 TO COMPLET THIS PROJECT

    • @Codemycom
      @Codemycom  3 роки тому +1

      yes, I'm out of town with a family emergency. Will resume when I return.

  • @georgeganko4856
    @georgeganko4856 Рік тому

    I'm following this video step by step and getting an error in segment Insert. SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
    # Add data to the screen
    global count
    count = 0
    for record in data:
    if count % 2 == 0:
    my_tree.insert(parent=' ', index='end', iid=count, text=" ",
    values=(record[0], record[1], record[2], record[3],
    record[4], record[5], record[6], record[7],
    record[8], record[9], tags=('evenrow',))
    else:
    my_tree.insert(parent=' ', index='end', iid=count, text=" ",
    values=(record[0], record[1], record[2], record[3],
    record[4], record[5], record[6], record[7],
    record[8], record[9], tags=('oddrow',))
    # Increment counter
    count += 1
    Traceback:
    File "C:\Python310\Code\GUI in Python\Tutorial on Treeview\# Build a CRM Tool With Treeview And Database - Py.py", line 104
    record[8], record[9], tags=('evenrow',))
    ^^^^^^^^^^^^^^^^^
    SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
    I don't see where the error is. Please help.

    • @Codemycom
      @Codemycom  Рік тому

      don't chop things up on separate lines like you are doing

  • @lajoskovacs1454
    @lajoskovacs1454 2 роки тому

    my_tree.insert(parent='', index='end', iid=count, text='', values=(record[0], record[1],record[2], record[3],record[4],record[5],record[6], tags=('evenrow',))
    ^
    SyntaxError: invalid syntax
    I dont understand

    • @TomaszKalusMusic
      @TomaszKalusMusic 2 роки тому +1

      you didn't close the parentheses at the end of record[6] in values

  • @techguydilan
    @techguydilan 11 місяців тому

    Ugh, tkinter must have changed a ton with Treeview widgets, none of this stuff works now. Especially the headings.

    • @Codemycom
      @Codemycom  11 місяців тому

      Nope, literally nothing has changed at all. You're just doing something terribly wrong.