简体   繁体   中英

COMBOBOX is not vertically sizable wxpython

i am wondering if there is a way to size a combobox vertically

This does not work

    self.combo1 = wx.ComboBox(self, -1, value='dsadas', pos=wx.Point(10, 30),
        size=wx.Size(120, 423450), choices=areaList)

It will size for x but it will not size for the y value. If we change the y value, the combo box will remain the same.

I am using Windows 7 64 bit

I don't think the wx.ComboBox will allow the vertical size to be set if the native widget doesn't accept that argument. Remember, wxPython wraps the native widgets of the platform and must conform to those widget's limitations.

On the other hand, you CAN use the ComboCtrl (wx.combo.ComboCtrl) and change both its vertical and horizontal sizes because it is is a custom control. I tested this using the wxPython demo on my Windows 7 64-bit box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM