當前位置:首頁 » 編程語言 » 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()

僅供參考。

熱點內容
伺服器端的http地址 發布:2025-07-01 10:04:35 瀏覽:176
php好處 發布:2025-07-01 10:01:45 瀏覽:877
安卓車機什麼屏幕好 發布:2025-07-01 09:46:15 瀏覽:546
編譯原理re不能描述的串 發布:2025-07-01 09:34:24 瀏覽:75
本地電腦怎麼用伺服器ip 發布:2025-07-01 09:10:03 瀏覽:831
有趣的python代碼 發布:2025-07-01 09:10:02 瀏覽:361
威龍奇兵ftp 發布:2025-07-01 09:07:38 瀏覽:694
linuxedit 發布:2025-07-01 09:03:36 瀏覽:424
跑分平台腳本 發布:2025-07-01 08:40:17 瀏覽:601
手機上的中文編程軟體 發布:2025-07-01 08:39:13 瀏覽:823