how to update dataviewctrl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to update dataviewctrl

Marco Prosperi

hello, I have a dataviectrl with its dataviewctrlmodel. The dataviewctrlmodel has a data member (a list of tuples) containing the data to show up, as the self.data in the DVC_DataViewModel in the demo. If I programmatically swap two tuples in the data variable, how can I see the items swapped in dataviewctrl? A call to Refresh retrieves values from the changed model.data but on screen the order of items remains the same. Is there some other action to add?

thanks in advance for hints

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to update dataviewctrl

Marco Prosperi

I've attached a modified version of demo script as example. Select a song from the tree and click on shift down button: nothing happens on screen for the selected song and the ones that follows but the songs should be swapped in the model

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

DVC_DataViewModel.py (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to update dataviewctrl

Marco Prosperi


solved using dvc.GetModel().Cleared()


On Sunday, October 29, 2017 at 12:43:40 PM UTC+1, Marco Prosperi wrote:

I've attached a modified version of demo script as example. Select a song from the tree and click on shift down button: nothing happens on screen for the selected song and the ones that follows but the songs should be swapped in the model

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.