Python Forum
set value in tktable
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set value in tktable
#1
how can i set values (for example query result from sql) in a tktable????
i don't understand meaning of the following lines

self.table.set( str® + "," + str©, str( col ))

or

self.table.set('row', idx, col)

please explain them
".set" is a function in TkTable.py

i can fetchall my data from the database, but my tktable don't show my q

a part of my code that gets data from sql table and then puts in the tktable, is:
[def fill_table( self, cur ):
        
        cur.execute("SELECT * FROM trunmanage")
        rows = cur.fetchall()
        print("rows")
        print(rows)


        r = 0

        for row in rows:

            c = 0

            for col in row:

                self.table.set( str(r) + "," + str(c), str( col )

                c = c + 1

            r = r + 1]
if you have another suggestion instead of tktable, please tell me
i need a table so that i can get index of row & column of the selected row and also with "bind" attribute
Reply
#2
Hi. I would like to ask, if are familiar with tktable package/module?

do you have any documentations
Reply
#3
There's another post on tktable which is a 'tk' rotuine, not tkinter.
the link to the documentation is here: https://www.eso.org/projects/vlt/sw-dev/...Table.html
the other post is: https://python-forum.io/Thread-set-value...ht=tktable
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  tktable/ table on GUI garikhgh0 3 10,902 Feb-22-2018, 12:17 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020