filtered list using wxPython

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

filtered list using wxPython

ganeshkumar patil
Hi,

Please refer the attached GUI file. My question is as below:

I have 2 lists having paths:
NormalList=[ccp/cc/minid, ccp/cc/pri, ccp/cc/swicthOn]
HMIList=[hmi/gct/pri, hmi/hct/monname, hmi/jct/heaterOn]

If you refer GUI, when i selected "New Datapoint's Base" as normal and entered letters in "New Datapoint's Path", GUI should show all the paths from NomralList matching to word or letter typing.

similarly, when i selected "New Datapoint's Base" as HMI and entered letters in "New Datapoint's Path", GUI should show all the paths from HMIList matching to word or letter typing.

Regards
Ganesh

--
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.

commandWindow.JPG (65K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: filtered list using wxPython

Mike Driscoll


On Thursday, February 2, 2017 at 10:22:40 AM UTC-6, ganeshkumar patil wrote:
Hi,

Please refer the attached GUI file. My question is as below:

I have 2 lists having paths:
NormalList=[ccp/cc/minid, ccp/cc/pri, ccp/cc/swicthOn]
HMIList=[hmi/gct/pri, hmi/hct/monname, hmi/jct/heaterOn]

If you refer GUI, when i selected "New Datapoint's Base" as normal and entered letters in "New Datapoint's Path", GUI should show all the paths from NomralList matching to word or letter typing.


You will have to do this yourself. Your code needs to catch the character events (EVT_TEXT) and rebuild the listctrl accordingly as each character is typed.  You can read more here: http://stackoverflow.com/questions/7059153/wxpython-dynamially-update-a-listctrl-depending-on-input-into-a-textctrl

Alternatively, you can use the ObjectListView widget which has filtering builtin. It's also mentioned in the above link.

Mike

similarly, when i selected "New Datapoint's Base" as HMI and entered letters in "New Datapoint's Path", GUI should show all the paths from HMIList matching to word or letter typing.

Regards
Ganesh

--
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.