Login.ipynb.txt
unknown
plain_text
5 months ago
5.2 kB
5
Indexable
{ "cells": [ { "cell_type": "code", "execution_count": 89, "id": "8adb933e-2ed9-4a26-a23f-1b14c45e5275", "metadata": {}, "outputs": [], "source": [ "import tkinter as tk;\n", "\n", "root=tk.Tk();\n", "root.title(\"First APP\");\n", "\n", "root.geometry('350x200')\n", "\n", "root.resizable(True,False)\n", "\n", "lbl=tk.Label(root,text =' Welcome',bg='yellow',fg='black',font=('Times New Roman',20))\n", "lbl.pack(ipadx=10,ipady=10)\n", "\n", "lb2=tk.Label(root,text ='Username :',fg='black',font=('Times New Roman',15))\n", "lb2.place(x=600,y=100)\n", "\n", "tx1=tk.Entry(root)\n", "tx1.place(x=750,y=100,width=200,height=30)\n", "\n", "lb3=tk.Label(root,text ='Password :',fg='black',font=('Times New Roman',15))\n", "lb3.place(x=600,y=200)\n", "\n", "tx2=tk.Entry(root,show=\"*\")\n", "tx2.place(x=750,y=200,width=200,height=30)\n", "\n", "b1=tk.Button(root,text=\"Click to login\",bg='red',fg='White',activebackground='black',activeforeground='white',highlightbackground='#3E4149')\n", "b1.place(x=700,y=260)\n", "\n", "\n", "\n", "\n", "'''photo = PhotoImage(file = \"Home\\Desktop\\53\\circle.jpeg\")\n", "Button(root, text = 'Click Me !', image = photo).pack(side = TOP) '''\n", "\n", "\n", "\n", "\n", "root.mainloop()\n", "\n" ] }, { "cell_type": "code", "execution_count": 90, "id": "845650f7-0c02-454a-a493-9c5d11c5acae", "metadata": {}, "outputs": [], "source": [ "import tkinter as tk;\n", "from tkinter import *;\n", "from tkinter import messagebox;\n", "\n", "root=tk.Tk();\n", "root.title(\"Register\");\n", "\n", "root.geometry('700x700')\n", "\n", "root.resizable(True,False)\n", "\n", "def fun():\n", " messagebox.showinfo(\"Success\",\"Successfully done\")\n", "\n", "\n", "lbl=tk.Label(root,text =' Student Registration ',bg='yellow',fg='black',font=('Times New Roman',20))\n", "lbl.pack(ipadx=10,ipady=10)\n", "\n", "lb2=tk.Label(root,text ='Students Name :',fg='black',font=('Times New Roman',15))\n", "lb2.place(x=500,y=100)\n", "\n", "tx1=tk.Entry(root)\n", "tx1.place(x=650,y=100,width=300,height=30)\n", "\n", "lb3=tk.Label(root,text ='Fathers Name :',fg='black',font=('Times New Roman',15))\n", "lb3.place(x=500,y=150)\n", "\n", "tx2=tk.Entry(root)\n", "tx2.place(x=650,y=150,width=300,height=30)\n", "\n", "lb4=tk.Label(root,text ='Gender :',fg='black',font=('Times New Roman',15))\n", "lb4.place(x=500,y=200)\n", "\n", "rad_var=IntVar()\n", "rd1=tk.Radiobutton(root,text='Male',variable=rad_var,value=1)\n", "rd1.place(x=650,y=200)\n", "\n", "rd2=tk.Radiobutton(root,text='Female',variable=rad_var,value=2)\n", "rd2.place(x=750,y=200)\n", "\n", "lb5=tk.Label(root,text ='Languages Known :',fg='black',font=('Times New Roman',15))\n", "lb5.place(x=500,y=250)\n", "\n", "chk1_var=IntVar()\n", "ch1=tk.Checkbutton(root,text='English',variable=chk1_var,onvalue=1,offvalue=0)\n", "ch1.place(x=675,y=250)\n", "chk2_var=IntVar()\n", "ch2=tk.Checkbutton(root,text='Hindi',variable=chk2_var,onvalue=1,offvalue=0)\n", "ch2.place(x=775,y=250)\n", "\n", "chk3_var=IntVar()\n", "ch3=tk.Checkbutton(root,text='Marathi',variable=chk3_var,onvalue=1,offvalue=0)\n", "ch3.place(x=675,y=275)\n", "\n", "lb6=tk.Label(root,text ='Address :',fg='black',font=('Times New Roman',15))\n", "lb6.place(x=500,y=325)\n", "\n", "tx3=tk.Entry(root)\n", "tx3.place(x=650,y=325,width=300,height=70)\n", "\n", "lb7=tk.Label(root,text ='Mobile no. :',fg='black',font=('Times New Roman',15))\n", "lb7.place(x=500,y=400)\n", "\n", "tx4=tk.Entry(root)\n", "\n", "tx4.place(x=650,y=400,width=150,height=30)\n", "\n", "b1=tk.Button(root,text=\"Submit\",bg='red',fg='White',activebackground='black',activeforeground='white',highlightbackground='#3E4149',command=fun)\n", "b1.place(x=700,y=450)\n", "\n", "\n", "root.configure(bg='bisque1')\n", "\n", "root.mainloop()\n" ] }, { "cell_type": "code", "execution_count": null, "id": "8a2166b8-4f51-444e-8f50-f14d039eb20e", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "e0ea2802-0b21-4bf2-b41a-570ec7ba2bf8", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "03b10461-e6dd-40c4-91ac-2b9e36d9baf0", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }
Editor is loading...
Leave a Comment