Hello.
I am trying to use ListBox under SplitterWindow, but for some reason ListBox doesn't resize when I move the divider line or resize the window.
It just stays default size.
Probably missing something simple but I don't know what else to try.
I am using WxPython 2.8.3.0
Here is the simplest test case I came up with:
import wx
import os
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY, title, size = (400,300))
# make a splitter window
splitter=wx.SplitterWindow(self,wx.ID_ANY,style = wx.SP_LIVE_UPDATE)
sty=wx.BORDER_SUNKEN
# make 2 panes
select_pane=wx.Window(splitter,style=sty)
info_pane=wx.Window(splitter,style=sty)
sizer_box=wx.BoxSizer()
splitter.SetMinimumPaneSize(50)
# add both panes to the window
splitter.SplitVertically(select_pane,info_pane,100)
# put a ListBox on a select pane
test_list=["John Doe"]
list=wx.ListBox(select_pane, wx.ID_ANY,(0,0),(-1,-1), choices=test_list, style=wx.LB_SINGLE)
# add it to the sizer
sizer_box.Add(list,1,wx.EXPAND)
# try a bunch of stuff to make it work
select_pane.SetSizer(sizer_box)
select_pane.SetAutoLayout(1)
sizer_box.Fit(select_pane)
self.Show(True)
app = wx.PySimpleApp()
frame = MainWindow(None, -1, "Splitter Window Problem ")
app.MainLoop()
Thank you for your time.
···
--
.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com