简体   繁体   中英

Treectrl from database

I have a treectrl in my wxpython app. It is built from a database. It contains parent items and child items under their parent. What I need to do is grab some data related to the child parent which is selected. But there is a problem with this. Child parents may have the same name, even if they are under the same parent. What differs all items is their id in database. So, what method should I use to put the ids in treectrl without showing them. Or Can you suggest some other methods?

Thanks in advance.

You can use the SetPyData and GetPyData methods to associate arbitrary data to your treectrl items.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM