开发者

wx.combobox managed by sizer?

I've been looking around the web and all the examples I've seen have a given pos=(x,y) attribute for a wx.ComboBox or wx.Choice. However I need to let the position of the combobox (or an equivalent Widget) be managed by my sizer. Doing:

    itemSelect = wx.ComboBox(self, choices = list, style = wx.CB_DROPDOWN)      
    itemSelect.AppendItems(strings=list)
    itemSelect.Select(n=0)
    itemSizer.Add(itemSelec开发者_StackOverflow中文版t, 1, wx.EXPAND)

This creates the combobox but it is displayed in wrong positions. Should this work or is it another way to add it to the sizer ?

Regards, Bogdan


Your code should work, assuming there is more code you aren't showing us. Are you calling self.SetSizer(itemSizer) to associate the sizer with you container widget?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜