Works fine for me. Scrollbar and everything
Python 2.3.4
Wx 2.5.3.1
Win XP
It is 16.5 M in size with 5000 items.
Arin
···
-----Original Message-----
From: Nico Kruger [mailto:nico.kruger@gmail.com]
Sent: Thursday, January 20, 2005 7:46 AM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxPython-users] no vertical scrollbar with wxListBox
Hi there, I have run into a problem with wxListBox where when I insert
more than a certain amount of items into the widget, I get no vertical
scrollbar. I have reduced the problem to a small example program.
I am using wxPython v2.4.2.4 (wx.VERSION_STRING)
PS, I am new to the list and don't know exactly where to put this
query, but seeing as I am including only python source I decided on
wxPython-users instead of wx-users.
import wx
count = 2048
items = [str(x) for x in range(0,count)]
class TestApp(wx.App):
def OnInit(self):
frame = wx.Frame(None,-1,'test')
frame.Show()
self.test = wx.ListBox(frame,-1)
self.test.InsertItems(items,0)
#self.test.Set(items) # no go either
self.SetTopWindow(frame)
return True
ta = TestApp(0)
ta.MainLoop()
If I change the number count = 2048 to 2047 on my system, the list box
scrollbar is displayed. Any number higher than 2048 does not show a
scrollbar as far as I can determine. Now in the actual application
where I discovered the problem, the limit is 2183, which makes it even
more weird. Seems to have something to do maybe with available memory,
dunno really.
Does anyone have any suggestions or know what I may be doing wrong? Is
there a hard coded limit to the number of entries a ListBox can hold?
Even if someone can just test it and report back their results it
would be much appreciated.
Thanks in advance,
-Nico
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org