Posts

Showing posts from September, 2023

On-Screen Keyboard

 from tkinter import * def insert_character(char):     text_area.insert(INSERT, char) win = Tk() win.title("On Screen Keyboard") win.geometry("400x200") win.resizable(False, False) fnt = ("Arial", 20) title_label = Label(win, text="On-screen Keyboard", font=fnt) title_label.grid(row=0, column=0, columnspan=10)  # Adjusted columnspan for the title text_area = Text(win, width=49, height=2, borderwidth=1, relief="groove") text_area.grid(row=1, column=0, columnspan=10)  # Adjusted columnspan for the text area # Define rows and columns for keys rows = [     "1234567890",     "QWERTYUIOP",     "ASDFGHJKL;",     "ZXCVBNM,./" ] rw = 2 for row in rows:     colmn = 0     for button in row:         Button(win, text=button, width=2, padx=2, pady=2, borderwidth=2, relief="raised", bg= "#EFEFEF",fg= "#000000",command=lambda char=button: insert_character(char)).grid(row=rw, column=c...

tkinter

 from tkinter import Tk, Text, Canvas import tkinter as tk from tkinter import ttk win = tk.Tk() screen_width = win.winfo_screenwidth() screen_height = win.winfo_screenheight() win.geometry(f"{screen_width}x{screen_height}") win.title("notepad") text = tk.Text(win, height=42, width=170) text.pack(side=tk.LEFT, fill = tk.BOTH, expand=True) scrollbar = tk.Scrollbar(win, command=text.yview) scrollbar.pack(side=tk.RIGHT, fill=tk.Y) text.config(yscrollcommand=scrollbar.set) def replace_win():     outer_frame = tk.Frame(win, borderwidth=1, relief="solid")     outer_frame.place(x=5, y=0, width=270, height=140)          find = tk.Label(text = "Find:",borderwidth = 1, relief = "solid" )     replace = tk.Label(text = "Replace:", borderwidth = 1, relief = "solid" )     find_entry = tk.Entry(borderwidth = 1, relief = "solid" )     replace_entry = tk.Entry(borderwidth = 1, relief = "solid" )     btn1 = tk.Butt...

Linear regression described

Image