12-15-2010 04:29 PM
Ok, this is probably a stupid question, but how does one get the position of a ring inside of a tree control? I have a tree with two columns, with rings in the second column. I can set the position using SetTreeCellRingValueFromIndex(), but how does one get the position after the user has modified the control? I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex() but I haven't found a way to get either the Index or the Value of the ring (what I'm looking for is the index, but if I can obtain the value I can go from there). Thanks in advance!
Solved! Go to Solution.
12-16-2010 12:27 AM
Hi,
You can use GetTableCellVal function to get the value of the ring.
There is not special "ring" function for that. Maybe that's what you were searching for 😉
From the value you can get to the index using the functions you are already aware of.
Hope this helps,
12-16-2010 08:36 AM
Hi,
Thanks for the reply. I believe that function is for a Table control. I tried it on the Tree control anyway, and I get an error of -10 "The control is not the type expected by the function.".
I'm still stumped on this. I tried looking through the examples, hoping to find a Tree example that uses rings, but none of them do. Seems like I must be missing something obvious.
12-16-2010 02:12 PM
You can get the value of the tree cell by GetTreeCellAttribute(ATTR_LABEL_TEXT). Then, as you noted, you can use GetTreeCellRingIndexFromValue() to get the index.
Hope this helps.
- jared
12-16-2010 03:01 PM
Hi,
Using ATTR_LABEL_TEXT works. I guess thinking of the ring value as the label text didn't seem intuitive for me. Thanks!