listctrl

How to set and preserve minimal width?

I use some wx.ListCtrl classes in wx.LC_REPORT mode, augmented with ListCtrlAutoWidthMixin. The problem is: When user double clicks the column divider (to auto resize column), column width is set to match the width of contents. This is done by the wx library and resizes column to just few pixels when the control is empty. I tried calli...

wxPython wxListCtrl selected row color

I want to have certain rows selected color be red instead of the standard color (blue on windows) so that I can indicate status. Anyone know if this is possible in wxPython? ...

How can I get the width of a wx.ListCtrl and its column name?

I'm working in wx.Python and I want to get the columns of my wx.ListCtrl to auto-resize i.e. to be at minimum the width of the column name and otherwise as wide as the widest element or its column name. At first I thought the ListCtrlAutoWidthMixin might do this but it doesn't so it looks like I might have to do it myself (Please correc...

Displaying integers in a wxpython listctrl

I have a wxPython ListCtrl with five columns. Four of these hold strings, the last one has integer values. I have been storing these as strings (i.e. '4', '17', etc.). However, now that I have added a ColumnSorterMixin to let me sort specific columns in the list, I'm finding, of course, that the integer column is being sorted lexically r...

ListCtrl - wxPython / Python

Hello everyone. My question is if we can assign/bind some value to a certain item and hide that value(or if we can do the same thing in another way). Example: Lets say the columns on ListCtrl are "Name" and "Description": self.lc = wx.ListCtrl(self, -1, style=wx.LC_REPORT) self.lc.InsertColumn(0, 'Name') self.lc.InsertColumn(1, 'Descri...

wxPython - Save Items in ListCtrl

Hello everyone. My question is if we can save the items on ListCtrl so everytime someone opens the application, the items are there and if the user removes it, it also removes from the configuration. I know that I can use wx.Config and I'm trying to accomplish using that but I don't know how to read it in a way to accomplish what I want....

wxPython ListCtrl Column Ignores Specific Fields

I'm rewriting this post to clarify some things and provide a full class definition for the Virtual List I'm having trouble with. The class is defined like so: from wx import ListCtrl, LC_REPORT, LC_VIRTUAL, LC_HRULES, LC_VRULES, \ EVT_LIST_COL_CLICK, EVT_LIST_CACHE_HINT, EVT_LIST_COL_RIGHT_CLICK, \ ImageList, IMAGE_LIST_SMALL, Men...

Full Row Selection + Change selection color on wxPython.ListCtrl?

On wxpython.ListCtrl: How to implement Full Row Selection(you can select from any column) And change selected color(default is blue)? BTW: wxpython document bites me. ...

Cannot format first column in WxPython's ListCtrl

If I set the format of the first column in a ListCtrl to align centre (or align right) nothing happens. It works for the other columns. This only happens on Windows - I have tested it on Linux and it works fine. Does anyone know if there is a work-round or other solution? Here is an example based on code found at http://zetcode.com/wxp...

wxPython: VirtualTreeListCtrl with millions of items

I would like to add 1,000,000+ entries to the root node of a TreeListCtrl. Therefore I would like to make it "virtual", i.e. work just like a virtual ListCtrl so that it's still fast and I can easily scroll around due to the currently-displayed items being loaded on-demand. But I can't use a virtual ListCtrl because I also want to be abl...

Listview flickers on Win32 dialog when removing and re-adding all items and all columns

Consider a plain Win32 dialog with listview control (in report mode) written in C++. Upon a certain event all items and all columns are deleted and new columns and items are created. Basically, as content changes, columns are automatically generated based on content. When old items/columns are removed and new ones added, listview flicke...

WxPython: deriving wx.ListItem but wx.ListCtrl only returns old class

Hello people, I've got a small issue with derived classes, namely wx.ListItem with wx.ListCtrl. I succesfully derived wx.ListItem as a MediaItem, the code is not finished but you get the point: class MediaItem(wx.ListItem): def __init__ (self, fullname): wx.ListItem.__init__(self) self.fullname = fullname s...

lstrcpy() causing exceptions in visual C++ code

Hi, I used a MFC virtual list control to enhance the performance and I handle GetDispInfo(NMHDR* pNMHDR, LRESULT* pResult) to populate the ListCtrl. The relevant code in that method is as follows: if (pItem->mask && LVIF_TEXT) { switch(pItem->iSubItem) { case 0: lstrcpy(pItem->pszText, rLabel.m_strText); ...

wxPython: Respond to Listctrl change exactly once

I'm working on a form using wxPython where I want want listctrl's list of values to change based on the selection of another listctrl. To do this, I'm using methods linked to the controlling object's EVT_LIST_ITEM_SELECTED and EVT_LIST_ITEM_DESELECTED events to call Publisher.sendMessage. The control to be changed has a method that is ...

a problem about wxpython listctrl

I got a GUI application implemented in wxpython, on the main window, there is a listctrl used to dispaly the names of the files. it was empty at the very beginning. the user clicks the "File", then "open", then chooses a file to open, when this is done by clicking on the "ok" button, the names of the file is supposed to be display in the...