Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » Drag & Drop , Sort, GetValue( x )
Re: Drag & Drop , Sort, GetValue( x ) [message #19588 is a reply to message #19586] Sun, 21 December 2008 14:04 Go to previous messageGo to previous message
sapiency is currently offline  sapiency
Messages: 56
Registered: September 2008
Member
hi,

I modified the example above to show it more clearly what happens

creating the elements and show the content of the tree:
[12/21/2008 13:15:14.3824] Elements: 10
[12/21/2008 13:15:14.3824]  just created ( 1)  get with i: I	 get with n: I
[12/21/2008 13:15:14.3824]  just created ( 2)  get with i: II	 get with n: II
[12/21/2008 13:15:14.3824]  just created ( 3)  get with i: III	 get with n: III
[12/21/2008 13:15:14.3824]  just created ( 4)  get with i: IV	 get with n: IV
[12/21/2008 13:15:14.3824]  just created ( 5)  get with i: V	 get with n: V
[12/21/2008 13:15:14.3824]  just created ( 6)  get with i: VI	 get with n: VI
[12/21/2008 13:15:14.3824]  just created ( 7)  get with i: VII	 get with n: VII
[12/21/2008 13:15:14.3824]  just created ( 8)  get with i: VIII	 get with n: VIII
[12/21/2008 13:15:14.3824]  just created ( 9)  get with i: IX	 get with n: IX


choose element 8 with value "VIII" and drop it to the end of the list.
parent = 0
ii = 9
sel[i] = 8
[12/21/2008 13:15:26.6583] AcceptInternal<TreeCtrl>(d, 'mytreedrag'): parent:  0, ii  9
[12/21/2008 13:15:26.6583] Elements: 10
[12/21/2008 13:15:28.8165]  unsorted ( 1)  get with i: I	 get with n: I
[12/21/2008 13:15:28.8165]  unsorted ( 2)  get with i: II	 get with n: II
[12/21/2008 13:15:28.8165]  unsorted ( 3)  get with i: III	 get with n: III
[12/21/2008 13:15:28.8165]  unsorted ( 4)  get with i: IV	 get with n: IV
[12/21/2008 13:15:28.8165]  unsorted ( 5)  get with i: V	 get with n: V
[12/21/2008 13:15:28.8165]  unsorted ( 6)  get with i: VI	 get with n: VI
[12/21/2008 13:15:28.8165]  unsorted ( 7)  get with i: VII	 get with n: VII
[12/21/2008 13:15:28.8165]  unsorted ( 8)  get with i: 	 get with n: IX
[12/21/2008 13:15:28.8165]  unsorted ( 9)  get with i: IX	 get with n: VIII


take last element with value "VIII" and drop it between "V" and "VI"
parent = 0
ii = 5
sel[i] = 10
[12/21/2008 13:16:12.1737] AcceptInternal<TreeCtrl>(d, 'mytreedrag'): parent:  0, ii  5
[12/21/2008 13:16:12.1737] Elements: 10
[12/21/2008 13:16:15.4792]  unsorted ( 1)  get with i: I	 get with n: I
[12/21/2008 13:16:15.4792]  unsorted ( 2)  get with i: II	 get with n: II
[12/21/2008 13:16:15.4792]  unsorted ( 3)  get with i: III	 get with n: III
[12/21/2008 13:16:15.4792]  unsorted ( 4)  get with i: IV	 get with n: IV
[12/21/2008 13:16:15.4792]  unsorted ( 5)  get with i: V	 get with n: V
[12/21/2008 13:16:15.4792]  unsorted ( 6)  get with i: VI	 get with n: VIII
[12/21/2008 13:16:15.4792]  unsorted ( 7)  get with i: VII	 get with n: VI
[12/21/2008 13:16:15.4792]  unsorted ( 8)  get with i: VIII	 get with n: VII
[12/21/2008 13:16:15.4792]  unsorted ( 9)  get with i: IX	 get with n: IX


after the second step the tree loose the value from Element with ID 8 because it got ID 10 when I put it to the end of the list.

regards

reinhard

[Updated on: Sat, 27 December 2008 23:30]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Optional highlighting of focused node's control along with value
Next Topic: gui crashes.
Goto Forum:
  


Current Time: Mon Apr 29 02:46:04 CEST 2024

Total time taken to generate the page: 0.08751 seconds