473,383 Members | 1,813 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,383 software developers and data experts.

Delete item from wxListCtrl

Hi,

I am having problems deleting one item from a list in a wxListCtrl widget.
My thought was to select it as presented below:

def onSelect(self, event):
self.item = event.GetItem()
self.list.DeleteItem(self.item)

This won't work, it appaers GetItem() is returning an object while
DeleteItem() requires a long as its input. How do I pass the item to the
DeleteItem function?

Regards,
Joost
Jul 18 '05 #1
1 4935

"Jude Venn" <ju*******@blueyonder.co.uk> wrote in message
haven't checked, but i think there's a GetIndex() method on the event object that returns the index of the selection.


Yep, I tested it, and it worked!
thanx a lot!
Jul 18 '05 #2

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

Similar topics

1
by: bmoore | last post by:
Hello. I am working on an application using wxPython that includes a panel with a wxListCtrl populated with data received from a LAN attached database. I want the wxListCtrl panel to be...
1
by: Mark Carter | last post by:
I would like a wxListCtrl with 3 columns in it. The number of rows in it will vary during run-time. In the first column of each row should be a wxCheckBox, which the user can check or uncheck. ...
3
by: Piet | last post by:
Hi there. I am trying to display tabular data in a wxListCtrl. What I get from the script below are only the headers, not the items themselves. The documentation didn´t help me much; instead I was...
0
by: Piet | last post by:
Hello, I am working on a graphical MySQL Frontend written in python/wxPython. The results from a table query are displayed either in a wxGrid or in a wxListCtrl. I would prefer the latter because...
0
by: kalyan.abbaraju | last post by:
Hi, I have to create a ListBox in which I have to move items up and down using DnD. How to create drag and drop call backs in wxListCtrl. I can see EVT_LIST_BEGIN_DRAG but I could not find any...
2
by: Jim McGivney | last post by:
I am using a Microsoft Book as a guide and trying to construct a Delete Command Event Handler for a DataGrid. The book lists the statement: ...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
10
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C...
12
by: yufufi | last post by:
Hello, How does delete know how much memory to deallocate from the given pointer? AFAIK this informations is put there by new. new puts the size of the allocated memory before the just before...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.