Jump to content

Recommended Posts

Posted

In our program we have a treeview (TUniTreeview) and the contents of which are added when the program loads....

 

  tempNode2 := NavTree.Items.Add(nil, 'Recordings');
  tempNode2.ImageIndex := 1; tempNode2.SelectedIndex := 1;
 

but ... only want certain nodes in the treeview to appear in expanded form, but not others when the page is initially displayed to the user. ie .. I tried something like...

 

  NavTree.Items[1].Expand(True)

 

but that did not work.

 

Can someone give me a hand on what to do here? Thanks.

Posted

Hi,

 

In our program we have a treeview (TUniTreeview) and the contents of which are added when the program loads....

 

Can you make a simple testcase for this?!

 

Best regards,

Posted

Attached demo program.

 

The demo program I created as built in steps. First I populate the treeview via button onclick event, and ti worked as expected. Then I added code to populate treeview during the form create event and that is when node 'B' does not expand.

TestTreeView1.zip

  • 4 months later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...