[python-win32] win32gui and SysListView32

Michel Claveau mc at mclaveau.com
Fri Feb 19 08:12:43 CET 2010


Hi, Tim!

Thanks for your answer.


>>  - The size is limited to 9999 lines ; how define more?
>  The number of items is limited only by available memory

You are right. I tried with 300 000 lines, without problem.
I do not know I had a 9999 limit on my first tests...  Sorry for trouble.

Little info (for other readers):
This code give more speed:
    win32gui.PostMessage(self.hwnd, win32con.WM_SETREDRAW,0,0)
    ...(preparation of data in show)...
    win32gui.PostMessage(self.hwnd, win32con.WM_SETREDRAW,1,0)
    win32gui.UpdateWindow(self.hwnd)


>>  - I did not found how define alignment for columns (Left, Right, Center)
> "fmt" member of the LVCOLUMN ... If you use LVM_SETCOLUMN, you
> should probably do an LVM_GETCOLUMN first.

OK, it's run. Without LVM_GETCOLUMN first. But with win32gui.UpdateWindow 
after.

Thank you very well & again :)))


> The leftmost column is ALWAYS left-justified.  This cannot be changed.

In my W7, I can align the column 0 (leftmost) without problem. Perhaps 
because I insert it in last operation?


> This seems like the hard way to write an application.  Have you
> considered using a GUI framework like Tkinter or Qt or (my favorite)
> wxPython?

I tried TK: limited.
I tried wx: I let down, because several conflict's versions, and it is very 
complicated.
Actually, I use Autoit like GUI, and Python's functions linked to UIobject 
and events (via COM) ; run OK, but not pythonic.
Also I use IE like GUI, with PLUIE (http://ponx.org/ponx/guiescreens.htm) ; 
but it is not very fast.

I think than a pure  pywin32 is a good way to explore.

Have a nice day.

Michel Claveau





More information about the python-win32 mailing list