python tkinter 开发测试

from  tkinter import *

def name_1_cs():
    ydm_1_2.place_forget()
    ydmwz_1_2.place_forget()
    ydmwz_1_2_B1.place_forget()
    xz_1_1.place_forget()
    ydmwz_1_2_B2.place_forget()
    xz_1_2.place_forget()

    mulu_1.place_forget()
    mulu_2.place_forget()
    mulu_3.place_forget()
    mulu_4.place_forget()
    mulu_2_2.place_forget()
    mulu_3_3.place_forget()
    mulu_4_4.place_forget()

    xx_2_1.place_forget()
    xx_2_2.place_forget()
    xx_2_3.place_forget()
    xx_2_4.place_forget()
    mulu_1_1.place(x=15, y=90)

    xx_1_1.place(x=15, y=130)
    xx_1_2.place(x=15, y=170)
    xx_1_3.place(x=15, y=210)
    xx_1_4.place(x=15, y=250)

    xx_2_1.config(fg='#C0C0C0')
    xx_2_2.config(fg="#C0C0C0")
    xx_2_3.config(fg="#C0C0C0")
    xx_2_4.config(fg="#C0C0C0")
    print("按钮1")

# 第一个组件的子元件
def xx_1_name_1_cs():
    xx_1_1.config(fg='#000000')
    xx_1_2.config(fg="#C0C0C0")
    xx_1_3.config(fg="#C0C0C0")
    xx_1_4.config(fg="#C0C0C0")
    print(1)

def xx_1_name_2_cs():
    xx_1_2.config(fg='#000000')
    xx_1_1.config(fg="#C0C0C0")
    xx_1_3.config(fg="#C0C0C0")
    xx_1_4.config(fg="#C0C0C0")
    print(2)

def xx_1_name_3_cs():
    xx_1_3.config(fg='#000000')
    xx_1_2.config(fg="#C0C0C0")
    xx_1_1.config(fg="#C0C0C0")
    xx_1_4.config(fg="#C0C0C0")
    print(3)

def xx_1_name_4_cs():
    xx_1_4.config(fg='#000000')
    xx_1_2.config(fg="#C0C0C0")
    xx_1_3.config(fg="#C0C0C0")
    xx_1_1.config(fg="#C0C0C0")
    print(4)

#------------------------------------

def name_2_cs():
    ydm_1_2.place_forget()
    ydmwz_1_2.place_forget()
    ydmwz_1_2_B1.place_forget()
    xz_1_1.place_forget()
    ydmwz_1_2_B2.place_forget()
    xz_1_2.place_forget()

    mulu_2.place_forget()
    mulu_3.place_forget()
    mulu_4.place_forget()
    mulu_1_1.place_forget()
    mulu_3_3.place_forget()
    mulu_4_4.place_forget
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值