Answers for "what is Tkinter"

5

tkinter tutorial

# check this code first.
from tkinter import *

app = Tk()
# The title of the project
app.title("The title of the project")
# The size of the window
app.geometry("400x400")

# Defining a funtion
def c():
    # Label
    m = Label(app, text="Text")
    m.pack()


# Button
l = Button(app, text="The text of the Butoon", command=c)
# Packing the Button
l.pack()
app.mainloop()
# Quick Note : 
# When you put a command you should not use parentheses
# l = Button(app, text="The text of the Butoon", command=c)
# l = Button(app, text="The text of the Butoon", command=c())
Posted by: Guest on November-22-2020
4

tkinter

from tkinter import * #import

def main():
  screen = Tk()#initialize
  screen.geomerty("num1xnum2") #pixels
  screen.title("Title")
  screen.cofigure(bg = 'grey')#hex colors or normal colors
  
  screen.mainloop()
main()#call
Posted by: Guest on June-28-2021
2

tkinter

from tkinter import *
from tkinter import ttk
root=Tk()
entry1=Entry(root,cursor="fleur",insertbackground="red")
entry1.pack()
Button(root,text="Get cursor type and colour", command=lambda: print(entry1['cursor'],entry1['insertbackground'])).pack()
root.mainloop()
Posted by: Guest on July-24-2021
7

what is selenium

- Selenium is a set of libraries that help us automate and interact 
  with the browsers.
  
  Why Selenium?
  - OPEN SOURCE -> FREE
    - It supports different types of browsers
    - It supports multiple different programming languages
    - Huge community behind it so many answers to any problems/questions
    - Could run on different OS systems such as: Mac, Windows, Linux etc.
Posted by: Guest on December-04-2020
4

python gui

import tkinter as tk
#Importing the main module
window = tk.Tk()
window.mainloop()
Posted by: Guest on October-04-2020
1

tkinter

from tkinter import *

root = Tk()
root.geometry("500x500")
root.title("My App")
root.config(bg="#ff0000")

def printhi(*args):
	print("Hi!")
    
btn = Button(root, text="Click to print hi", command=printhi)
btn.place(x=200, y=200)

root.mainloop()
Posted by: Guest on August-05-2021

Code answers related to "what is Tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language