当前位置:首页 » 编程语言 » python下拉列表

python下拉列表

发布时间: 2022-12-06 18:45:11

1. python conbobox的问题,为什么两个下拉列表的位置不变

你好,那个combobox的话,用grid不能用row和column,你需要numberchose.grid(padx=50, pady=50) 这样的话,就可以在x=50,y=50的地方了

2. python的下拉框导入什么包

Select包。python是一种计算机程序设计语言,根据查询python的官网得知,下拉框是可以通过索引搜索来选择的,导入的是Select包,表示的是select标签的元素对象。

3. python 如何根据excel里的数据选择网页下拉框选项

driver.execute_script("里面写js代码")
用js给select赋值value也行,或者给option赋属性selected也行

4. python tkinter 的下拉列表位置怎么设置

你好,你应该用grid函数
comboxlist.grid(padx=50, pady=50) 这样的话,就可以在x=50,y=50的地方了

5. python tkinter 如何做一个如下所示的下拉菜单

Tkinter居然没有这种组件,所以就只能模拟了

#! /usr/bin/python
# -*- coding: utf8 -*-
from Tkinter import *
class Select(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.label = Label(self, text="选择项目")
self.listBox = Listbox(self, height=1)
self.button = Button(self, text='V', command=self.triggle)
self.hideList = True
for i in xrange(10):
self.listBox.insert(i, 'Item%d'%i)
self.label.grid(row=0, column=0, sticky=N)
self.listBox.grid(row=0, column=1, sticky=N)
self.button.grid(row=0, column=2, sticky=N)
self.grid()
def triggle(self):
self.hideList ^= 1
self.listBox.config(height=[self.listBox.size(), 1][self.hideList])
app = Select()
app.mainloop()

仅供参考。

热点内容
python字母排序 发布:2025-09-16 07:02:45 浏览:214
源码移位除法 发布:2025-09-16 06:55:59 浏览:728
我的世界国际版服务器欢迎加入 发布:2025-09-16 06:54:31 浏览:989
php网页播放器 发布:2025-09-16 06:53:50 浏览:121
怎么破vivo手机的密码 发布:2025-09-16 06:45:50 浏览:767
最简单编程 发布:2025-09-16 06:36:46 浏览:458
压缩碳颗粒 发布:2025-09-16 06:18:30 浏览:540
计算机上输入ftp还是htp 发布:2025-09-16 06:00:09 浏览:555
汽车里面的花瓶怎么配置 发布:2025-09-16 05:56:05 浏览:455
溯源码贴 发布:2025-09-16 05:52:56 浏览:153