Downsize a wx.ListCtrl in a wx.Panel

Hi,

I’ve a frame with two panel, I would like to put in a panel_A some wx.Button and in the panel_B a wx.ListCtrl.

the problem is that the wx.ListCtrl don’t downsize in the panel with all the columns and it appears more little than the panel itself…

I’ve make

'panels

self.panel_a = wx.Panel(self,-1,wx.Point(30,15),wx.Size(70,135))
self.panel_a.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))

self.panel_b = wx.Panel(self,-1,wx.Point(105,10),wx.Size(320,260))

'Buttons

self.cmdNew = wx.Button(self.panel_a,-1,"&New",wx.Point(5,5),wx.Size(55,30))

self.cmdEdit = wx.Button(self.panel_a,-1,"&Edit",wx.Point(5,45),wx.Size(55,30))

self.cmdCancel = wx.Button(self.panel_a,-1,"&Cancel",wx.Point(5,85),wx.Size(55,30))

'the list in the panel_b

self.lstAminoacids = lstAminoacids(self.panel_b, DataSource())

Did you have a tip?

P.S.

The Style of the wx.ListCtrl is wx.LC_REPORT.It show data from a SQLite 3 db.

Beppe

Giuseppe Costanzi wrote:

Hi,
I've a frame with two panel, I would like to put in a panel_A some wx.Button and in the panel_B a wx.ListCtrl.
the problem is that the wx.ListCtrl don't downsize in the panel with all the columns and it appears more little than the panel itself...
I've make
'panels
self.panel_a = wx.Panel(self,-1,wx.Point(30,15),wx.Size(70,135))
self.panel_a.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
self.panel_b = wx.Panel(self,-1,wx.Point(105,10),wx.Size(320,260))
'Buttons
self.cmdNew = wx.Button(self.panel_a,-1,"&New",wx.Point(5,5),wx.Size(55,30))
self.cmdEdit = wx.Button(self.panel_a,-1,"&Edit",wx.Point(5,45),wx.Size(55,30))
self.cmdCancel = wx.Button(self.panel_a,-1,"&Cancel",wx.Point(5,85),wx.Size(55,30))
'the list in the panel_b
self.lstAminoacids = lstAminoacids(self.panel_b, DataSource())
Did you have a tip?

Either use a sizer to manage the size and position of the listctrl, or use brute force layout like you do for your buttons.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!