Tkinter - Treeview Configure Columns and Headers

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • #tkinter #python3 #python #pythongui #pythonguitutorial #treeview
    I'll cover how to do the following in the Treeview widget for Tkinter:
    1. Create columns
    2. Show and hide columns
    3. Show an image in a column header
    4. Set a header's text alignment
    5. Set the text alignment of rows in a column
    6. Set the width of a column
    0:00 Intro
    1:16 Add treeview widget
    2:12 Add columns
    4:49 Add text to column headers
    7:00 Add header text using an index number
    8:16 Show and hide columns
    9:57 Show image in header
    12:21 Set header text alignment
    13:03 Insert a row
    14:05 Set column text alignment
    15:15 Set column width
    16:15 Set column minimum width
    16:51 Prevent column expansion
    18:20 Closure
  • НаукаНаука

Комментарии • 19

  • @Flqmmable
    @Flqmmable 5 месяцев назад

    An absolutely perfect tutorial for treeview. Everything you could ever want to know for your first project is discussed, well done!

    • @jobinpy
      @jobinpy  5 месяцев назад

      Much appreciated!

  • @cryptolikeaboss
    @cryptolikeaboss Год назад

    Great Video, It really helped me! 👍👍👍👍👍👍👍👍👍👍👍👍

  • @ahmedragala3946
    @ahmedragala3946 9 месяцев назад

    Thanks!

  • @Mots-mot
    @Mots-mot 8 месяцев назад

    how to disable the header or set visible property to false?

  • @PA7RHM
    @PA7RHM Год назад

    thank you

    • @PA7RHM
      @PA7RHM Год назад

      I just improved my treeview with the information in your video

  • @extraitlecture610
    @extraitlecture610 6 месяцев назад

    Nice

  • @ahmedragala3946
    @ahmedragala3946 9 месяцев назад

    What is the value of the "parent" parameter of the "insert" method when the Treeview is in another "frame" widget for example. ? Is it "" or "frame"?

    • @jobinpy
      @jobinpy  9 месяцев назад

      The parent in the .insert() method of a treeview widget expects a treeview item, such as "I001" (ie: a sub-item). If the item you're adding is a root item, then parent can be a blank string( parent=""")

  • @funnyclips2696
    @funnyclips2696 Год назад

    👌🏿👌🏿👌🏿👌🏿👌🏿

  • @newtech9975
    @newtech9975 Год назад

    Bonsoir, en fait je voudrais inséré un treeview dans une fonction accompagné d'une image mais l'image n'apparaît pas et dans un toplevel besoin d'aide s'il vous plaît !!!

  • @Max.Mustermann.
    @Max.Mustermann. 7 месяцев назад

    My treeview frame shows another column, before my first written Column how do i avoid that ?

    • @jobinpy
      @jobinpy  7 месяцев назад

      I think what you're looking for is: treeview_widget.configure(show="headings")
      That will hide the first column, which is created automatically.

  • @MSM.90
    @MSM.90 2 года назад

    Thanks for great explanation 👍🏼, I have one question about columns, how to show each column frame in different colors?
    For example
    vehicle type "red"
    name " blue"
    Year " yellow "
    Thanks again for your video.

    • @jobinpy
      @jobinpy  2 года назад +1

      Hi Mohammed Alneyadi, if you're referring to treeview headers, the colors can only be changed for all headers, not specific headers. If you're referring to the columns which can contain multiple rows, colors can only be defined per-row, not per-column. Thanks for watching my videos.

    • @MSM.90
      @MSM.90 2 года назад

      @@jobinpy thanks for replying jobin ..
      I tried many ways, but as you said, the colors changed for all headers.
      I searched that I can use (tag_configure) but still no result yet .
      Thanks jobin ،keep going wish you all the best.

  • @sgg245
    @sgg245 Год назад

    Hi Jobin
    I want to upload data in tree view from csv file.

    • @jobinpy
      @jobinpy  Год назад

      Hello. There is a csv module for Python, you can use that module to read csv files and once you have the csv data, you can populate the treeview from that data. I've created a video about how to populate a treeview widget. Please check out the videos section of my channel. Thanks.