I've read Chapter 15 of wPIA and think that I have a handle (no pun
intended) on the proper use of a tree control. But, I want to confirm my
understanding of its behavior.
In my application, the widget will have two levels of items: policies and
sub-policies. I defined a root, and assigned that to rootID. When the user
adds a new policy (by clicking on the 'Add Policy' button), a text entry
dialog is called, the entered value is retuned to the calling method, and
added to the tree with the generic call:
polID = polTree.AppendItem(rootID, 'txt')
where txt is the returned string.
The confirmation I seek is whether polID is uniquely associated with each
instance of 'txt' automatically. If there are a dozen entities at this
level, then each has a unique polID that is recognized when the cursor
highlights that string in the widget. Yes?
So, if a policy is highlighted, and the user selects the 'Add Sub-Policy'
button, the grandchild is correctly associated with its child parent using:
subpolID = polTree.AppendItem(polID, 'txt')
Yes? It seems that this is all correct, but I want to check before I have
to trace and fix an obscure error.
TIA,
Rich
···
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863