How does the element tree control switch the selected state?

the effect I want to achieve is that when I click the cross on the right, the data on the right will be cleared, and the data corresponding to the tree control on the left will also be unchecked. Can it be realized and how?

Feb.24,2022

when you click on the right cross, you can get the corresponding data and change the state on the left


you can use the getCheckedKeys method of the tree control


is there a complete code? Recently, I have also encountered such a demand,

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdc507-312e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdc507-312e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?