wx.combobox drop down width

Hello,

I want my wx.combobox widgets have a function for arranging its drop down list width both using a given width and/or using autosizing.
Since my program have lots of custom wx.combobox, I cannot turn them into wx.combo.ComboCtrl. What should I do to have adjustable
drop down width? (Note: I googled it a lot and cannot find a solution.)

Ozan

There isn't a way in wx to control the width of the combo's dropdown window. That's one of the reasons that wx.combo.ComboCtrl exists.

···

On 6/17/11 1:19 AM, ozan hacıbekiroğlu wrote:

Hello,

I want my wx.combobox widgets have a function for arranging its drop
down list width both using a given width and/or using autosizing.
Since my program have lots of custom wx.combobox, I cannot turn them
into wx.combo.ComboCtrl. What should I do to have adjustable
drop down width? (Note: I googled it a lot and cannot find a solution.)

--
Robin Dunn
Software Craftsman

Thanx Robin. I just did not want to change my existing code much :slight_smile:

Ozan

···

On 18 Haziran, 22:11, Robin Dunn <ro...@alldunn.com> wrote:

On 6/17/11 1:19 AM,ozanhacıbekiroğlu wrote:

> Hello,

> I want my wx.combobox widgets have a function for arranging its drop
> down list width both using a given width and/or using autosizing.
> Since my program have lots of custom wx.combobox, I cannot turn them
> into wx.combo.ComboCtrl. What should I do to have adjustable
> drop down width? (Note: I googled it a lot and cannot find a solution.)

There isn't a way in wx to control the width of the combo's dropdown
window. That's one of the reasons that wx.combo.ComboCtrl exists.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

You should be able to just swap out the one line of code where you instantiate the ComboBox for the ComboCtrl. The rest shouldn’t change…

  • Mike