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

wxPython ListCtrl

Hello,

How can I Insert image with string in ListCtrl with this example:

# Import ftputil module - like ftplib
from ftputil import FTPHost
# Create connection
ftp=FTPHost("ftp.someserver.com","user","password" )

# LIST ALL FILES/FOLDERS ON SERVER
for item in ftp._dir("/"):
# Now check if item is file /folder
if item is file insert this image: wx.ART_NORMAL_FILE and if
the item is folder insert this image
wx.ART_FOLDER
........how can I do the same on server with GenericDirCtrl?

Regards,
Vedran

Nov 5 '07 #1
1 3572
On Nov 5, 11:00 am, vedrandeko...@v-programs.com wrote:
Hello,

How can I Insert image with string in ListCtrl with this example:

# Import ftputil module - like ftplib
from ftputil import FTPHost
# Create connection
ftp=FTPHost("ftp.someserver.com","user","password" )

# LIST ALL FILES/FOLDERS ON SERVER
for item in ftp._dir("/"):
# Now check if item is file /folder
if item is file insert this image: wx.ART_NORMAL_FILE and if
the item is folder insert this image
wx.ART_FOLDER

.......how can I do the same on server with GenericDirCtrl?

Regards,
Vedran
I would recommend looking at the wxPython demo as it shows how to add
pictures to the listctrl there. You'll probably need to look at
wx.ArtProvider to get the correct syntax for using its images:
http://wxpython.org/docs/api/wx.ArtProvider-class.html

You might also find the wiki's entry on listctrls helpful:
http://wiki.wxpython.org/ListControls

Of course, it sounds like you're making your own FTP client, so I
would use one of the treectrl variants rather than a listctrl. See the
TreeListCtrl, the TreeMixin or the CustomTreeCtrl.

The demo also shows code for the GenericDirCtrl. See http://www.wxpython.org/download.php

You may also find the wxPython user's group more helpful for wxPython
specific inquiries: http://www.wxpython.org/maillist.php

Mike

Nov 5 '07 #2

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

Similar topics

1
by: John Taylor | last post by:
I have a ListCtrl with 5 columns. The first 4 columns are either strings or integers, but the last column is a string in the format of MM-DD-YYYY. I searched google and also read over the...
1
by: Fabio Pliger | last post by:
Hi all, i'm working on a very large project using wx 2.5... On one frame i have a wx.lib.mixins.listctrl widget, wich is a listctrl extended with the possibility to edit the columns text...
0
by: Sven Tissot | last post by:
Hello, I am trying to build an editable ListCtrl_edit via TextEditMixin. It displays o.k. and I can edit the first field with this is the code piece: class VokabelListCtrl(wxListCtrl,...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this...
6
by: zdp | last post by:
Dear all: I made a window program by wxPython. Split windows, treectrl, listctrl and textctrl are used. When I program in python, the look & feel of the window controls are like the windos XP...
5
by: Benjamin | last post by:
I'm writing a search engine in Python with wxPython as the GUI. I have the actual searching preformed on a different thread from Gui thread. It sends it's results through a Queue to the results...
1
by: Benjamin | last post by:
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with...
0
by: asrekdal | last post by:
Hi, I am working with a wxPython ListCtrl Control and wondering if it is possilbe to place images in the cell rather than a string? -- Andrew
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.