Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python code to display a grid of data table

try:  from tkinter import *  from tkinter.ttk import *except ImportError :    print("exception in importing module")
class MyWindow(Frame):




    def CreateUI(self):        tv = Treeview(self)        tv['columns'] = ('Name', 'Mobile', 'course')        tv.heading("#0", text='RollNo', anchor='w')        tv.column("#0", anchor="w")        tv.heading('Name', text='Name')        tv.column('Name', anchor='center', width=100)        tv.heading('Mobile', text='Mobile')        tv.column('Mobile', anchor='center', width=100)        tv.heading('course', text='course')        tv.column('course', anchor='center', width=100)        tv.grid(sticky = (N,S,W,E))        self.treeview = tv        self.grid_rowconfigure(0, weight = 1)        self.grid_columnconfigure(0, weight = 1)root = Tk()MyWindow(root)root.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: iterating over the two ranges simultaneously 
Python :: how to count to 1billion in python 
Python :: python spacing problems 
Python :: 218922995834555169026 
Python :: pyqt message box set detailed text 
Python :: how to iclude parcentage in pivot table in pandas 
Python :: argc python 
Python :: Show output of views in html using ajax, django 
Python :: Desviacion estandard en pandas 
Python :: Improve the Request Change User-Agent 
Python :: flask pass an array of dicts 
Python :: Python List Comprehension: Elegant way to create Lists 
Python :: python empty list boolean 
Python :: Python ValueError in strptime() 
Python :: HTML automation not working on vscode with folder named templates on django 
Python :: Indices may also be negative numbers, to start counting from the right:Indices may also be negative numbers, to start counting from the right: 
Python :: multiKey dict error 
Python :: dataframe to DatasetDict 
Python :: tutorial on how to search the database in your django project 
Python :: disable gpu in jupyter notebook 
Python :: Passive to active Python 
Python :: how to make change the default from python 3.8 to python 3.10.5 on Mint 20 
Python :: find difference between two triangular numbers python 
Python :: restart kernel python 
Python :: biopython parse fasta 
Python :: Donut chart graphing funciton 
Python :: scale just one column pandas 
Python :: appears in json dump 
Python :: how to add previous and next in tkinter in python 
Python :: hms bagle 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =