469,936 Members | 2,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,936 developers. It's quick & easy.

Column not updating in listbox in wxPython example ??

In the following example the phone number does not apear in the phone
column of the llistbox. Can anybody tell me what I am doing wrong here

from wxPython.wx import *

class MyApp (wxApp) :
def OnInit (self) :
frame = MyFrame(NULL, -1, "Phone List")
self.SetTopWindow (frame)
return true

class MyFrame (wxFrame) :
def __init__ (self, parent, ID, title) :

self.lc = wxListCtrl(self,15,wxDLG_PNT(self,10,60),
wxDLG_SZE(self,120,75), style=wxLC_REPORT)
name = 'Peter'
phone = '01753 865830'
row = 1
self.lc.InsertStringItem(row, name)
self.lc.SetStringItem(row, 1, phone)

def getSelect (self, event) :
self.currentSel = event.m_itemIndex

app = MyApp(0)

Nov 22 '05 #1
0 1226

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Andrew | last post: by
3 posts views Thread by gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post: by
1 post views Thread by Spock | last post: by
reply views Thread by David Poundall | last post: by
6 posts views Thread by shuf | last post: by
6 posts views Thread by =?Utf-8?B?S2Fp?= | last post: by
1 post views Thread by Bailu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.