单选题

有如下Python代码,执行该代码,说法不正确的是?()

import tkinter as tkwindow = tk.Tk()window.title('ListBox')window.geometry('300x350')var1 = tk.StringVar()label = tk.Label(window, bg='yellow', width=4, height=2, textvariable=var1)label.pack()def print_selection():    value = https://tiku.scratchor.com/paper/question_answer/listbox.get(listbox.curselection())    var1.set(value)button = tk.Button(window, text='print selection', command=print_selection)button.pack()var2 = tk.StringVar()var2.set((11,22,33,44))listbox = tk.Listbox(window,listvariable=var2)listbox.pack()listitems = [1,2,3,4]for item in listitems:    listbox.insert('end', item)listbox.insert(1,'first')listbox.insert(1,'second')listbox.delete(1)window.mainloop()

A.

当前窗口的名称为ListBox

B.

当前窗口有一个按钮,名字为print selection

C.

当前窗口列表框中有"second"数据项

D.

当前窗口列表框中共有9条数据项

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部