#创建Window窗口(GUI)grid布局(按表格)

from tkinter import *                                                 #导入tkinter模块

root=Tk()                                              #创建window窗口对象
root.title('计算器示例_2111424王伊雯')            #设置窗口标题
root.geometry('200x300+280+280')
root.config(bg='#ccff00')

L1=Button(root,text='1',width=5,bg='#cc1166')
L2=Button(root,text='2',width=5,bg='red')
L3=Button(root,text='3',width=5,bg='blue')
L4=Button(root,text='4',width=5,bg='yellow')
L5=Button(root,text='5',width=5,bg='green')
L6=Button(root,text='6',width=5,bg='red')
L7=Button(root,text='7',width=5,bg='blue')
L8=Button(root,text='8',width=5,bg='yellow')
L9=B

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值