wx.ListCtrl doesn't display items nor columns when style=wx.LC_REPORT on Windows

hi, it's me again..

when i set the style to wx.LC_LIST it display the items but only the
first column as spected, but when i set it to wx.LC_REPORT it doesnt
show the columns nor items... just the listcrtl empty

this only happens on windows, on linux everything runs perfect...

Here is the code http://github.com/leferreyra/w3bex-sgpd
In the ui.py file.. the class MyFrame.. ( it happens in all classes
with listctrls )

Thanks

leferreyra wrote:


when i set the style to wx.LC_LIST it display the items but only the
first column as spected, but when i set it to wx.LC_REPORT it doesnt
show the columns nor items... just the listcrtl empty
this only happens on windows, on linux everything runs perfect...
  You have this:

          self.list_todos.InsertColumn(-1, "No")

          self.list_todos.InsertColumn(-1, "Cliente")

          self.list_todos.InsertColumn(-1, "Productos")

          self.list_todos.InsertColumn(-1, "Saldo", width=200)

          self.list_inactivos.InsertColumn(-1, "No")

          self.list_inactivos.InsertColumn(-1, "Cliente")

          self.list_inactivos.InsertColumn(-1, "Productos")

          self.list_inactivos.InsertColumn(-1, "Saldo", width=200)

          self.list_morosos.InsertColumn(-1, "No")

          self.list_morosos.InsertColumn(-1, "Cliente")

          self.list_morosos.InsertColumn(-1, "Productos")

          self.list_morosos.InsertColumn(-1, "Monto Atrasado", width=200)

          self.list_morosos.InsertColumn(-1, "Saldo",width=200)

  You are assuming that InsertColumn follows Python's rule that "-1"

means “at the end”. That’s not the case. InsertColumn
maps to a C++ method that then maps to operating system APIs, where
-1 is just an invalid column number. Replace those with 0, 1, 2, 3
and I think you will find success. Your columns started showing up
for me.

···
-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com

Try passing an actual column number to InsertColumn instead of -1.

···

On 4/24/12 8:18 AM, leferreyra wrote:

hi, it's me again..

when i set the style to wx.LC_LIST it display the items but only the
first column as spected, but when i set it to wx.LC_REPORT it doesnt
show the columns nor items... just the listcrtl empty

this only happens on windows, on linux everything runs perfect...

Here is the code GitHub - leferreyra/w3bex-sgpd: Sistema para Gestión de Pagos Diarios. Desarrollado para empresas que necesitan registrar pagos de productos dia a dia.
In the ui.py file.. the class MyFrame.. ( it happens in all classes
with listctrls )

--
Robin Dunn
Software Craftsman

Perfect, Thanks
I'm very impressed with how quickly you respond.. Thanks again!

···

El día 24 de abril de 2012 14:12, Robin Dunn <robin@alldunn.com> escribió:

On 4/24/12 8:18 AM, leferreyra wrote:

hi, it's me again..

when i set the style to wx.LC_LIST it display the items but only the
first column as spected, but when i set it to wx.LC_REPORT it doesnt
show the columns nor items... just the listcrtl empty

this only happens on windows, on linux everything runs perfect...

Here is the code GitHub - leferreyra/w3bex-sgpd: Sistema para Gestión de Pagos Diarios. Desarrollado para empresas que necesitan registrar pagos de productos dia a dia.
In the ui.py file.. the class MyFrame.. ( it happens in all classes
with listctrls )

Try passing an actual column number to InsertColumn instead of -1.

--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en