NetTalk Central

Author Topic: Tree Control  (Read 2461 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Tree Control
« on: October 14, 2024, 05:45:40 AM »
Hi

I have a tree control on a form. If a node is clicked I can capture the id from GetValue('row') - no problem.
The question is how to select (highlight) a node when initializing the tree.

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11254
    • View Profile
Re: Tree Control
« Reply #1 on: October 23, 2024, 06:57:03 PM »
When populating;

In your populate::aTree routine;
add a field to the TreeQueueType
selected         Long       ,name('selected | boolean')

Then when populating the queue set this field to true or false.


14.28 required for this next bit;
Later on, after the tree has been populated, You can select something using

p_web.ntTree('aTree','select','rowid')

(In both cases aTree is the Use Equate of the tree field on the form)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Tree Control
« Reply #2 on: October 24, 2024, 10:00:14 PM »
Thanks!
Works perfectly.