473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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")
frame.Show(true)
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)
EVT_LIST_ITEM_SELECTED(self,15,self.getSelect)
self.lc.InsertColumn(0,"Name")
self.lc.InsertColumn(1,"Phone")
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)
app.MainLoop()

Nov 22 '05 #1
0 1365

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andrew | last post by:
Hi I just started learning wxPython I wanted to know how I could do this in wxPython self.listbox.delete(0, END) for item in self.results: self.listbox.insert(END, item)
3
by: gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post by:
I have a ListBox built of a simple custom object for the ListItems used to be able to hold a Data Value, and a Display Value, with accessors for each. I have overridden the ToString method to...
1
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to...
0
by: David Poundall | last post by:
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) :...
6
by: shuf | last post by:
Hello, I am running python 2.4.4 with wxpython 2.6 on Fedora 6. I am trying to set the font color of individual elements in a listbox, but I am not able to with SetItemForegroundColour()...
6
by: =?Utf-8?B?S2Fp?= | last post by:
Hi all, using AJAX Toolkit with vb.net 2.0 how could I make this "Updating..." Screen like e.g. on Codeplex when you click on the "Vote" button...
1
by: Bailu | last post by:
Hi, I am a newbie in wxPython and doing a program with ListBox, I want to select and deselect items in this box, I have use self.devlist = wx.ListBox(self, style=wx.LB_MULTIPLE)...
3
by: Soren | last post by:
Hi, Id like to make my own special listbox.. I want to able (at the push of a button) to add another item to my special listbox... each item is a panel with a label, some buttons and maybe a...
4
by: Lou O | last post by:
Is it possible to use the row (index) of a list box as control source Property for a text box? Example: Text1.ControlSource Property is set to "= List1.Column(0,2)" in design view. When I open...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.