ListCtrl RefreshItem()

Hi,

Refreshing the item after changing its label/text in the list does not seem to work. I think it’s because my list is not a ‘virtual list’ based on documentation. What does it mean? Does it have to do with setting up EVT_LIST_CACHE_HINT?

Statement Of Confidentiality:

This electronic message transmission, and all attachments, contains information from Extron Electronics which is confidential and privileged. The information is for the exclusive viewing or use of the intended recipient. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by a “reply to sender only” message and destroy all electronic and hard copies of the communication, including attachments.

Qui Le wrote:

Hi,
Refreshing the item after changing its label/text in the list does not seem to work. I think it's because my list is not a 'virtual list' based on documentation. What does it mean? Does it have to do with setting up *EVT_LIST_CACHE_HINT?*

When I update my list control, I usually do something like this inside a loop:

<code>

list_ctrl.DeleteAllItems()

for item in list:
    list_ctrl.InsertStringItem()
    list_ctrl.SetStringItem()

</code>

I haven't messed with the virtual list stuff as of yet. Check the demo for how that's done. An alternative is the really cool ObjectListView:

http://objectlistview.sourceforge.net/python/

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Put an Refresh() before you update the items.

···

2008/12/8 Qui Le qle@extron.com

Hi,

Refreshing the item after changing its label/text in the list does not seem to work. I think it’s because my list is not a ‘virtual list’ based on documentation. What does it mean? Does it have to do with setting up EVT_LIST_CACHE_HINT?


Saludos / Best regards

Mario Lacunza
Software Architect - Webmaster

Email: mlacunza [AT] gmail [DOT] com

http://www.lacunza.info
Lima - Peru

Definitely, if you’re just starting out with list controls, do yourself a favor and switch NOW to ObjectListView. It’ll save you a lot of needless headaches now, and refactoring later.

···

On Mon, Dec 8, 2008 at 1:47 PM, Mike Driscoll mike@pythonlibrary.org wrote:

I haven’t messed with the virtual list stuff as of yet. Check the demo for how that’s done. An alternative is the really cool ObjectListView:

http://objectlistview.sourceforge.net/python/


www.fsrtechnologies.com