當前位置:首頁 » 編程語言 » 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-07-01 06:45:34 瀏覽:752
為什麼伺服器有多個ip地址沖突 發布:2025-07-01 06:32:09 瀏覽:623
java的md5演算法實現 發布:2025-07-01 06:23:09 瀏覽:235
android默認的activity 發布:2025-07-01 06:06:12 瀏覽:421
青浦智能密碼鎖開鎖多少錢 發布:2025-07-01 06:02:42 瀏覽:441
編譯內核生成 發布:2025-07-01 05:48:23 瀏覽:618
咖啡壓縮糖 發布:2025-07-01 05:43:58 瀏覽:581
雲搜卡源碼 發布:2025-07-01 05:32:38 瀏覽:543
華為伺服器怎麼查ip 發布:2025-07-01 05:15:18 瀏覽:373
編譯器中的數據結構 發布:2025-07-01 05:10:53 瀏覽:529