Jump to content


Photo

Browse children of a node


  • Please log in to reply
3 replies to this topic

#1 ag74

ag74
  • Members
  • 9 posts

Posted 14 November 2013 - 04:44 PM

Hello,

I use a TNextInspector to display project's properties that user can edit.
Here is how it looks like:

Group
-> SubGroup
-> Property #1
-> Property #2
-> Property #3

I would like to parse each property in the SubGroup node. So I tried this.

for( i = 0; i < tSbuGroup->ItemCount; i++ )
{
tSbuGroup->Item[ i ]
}

But ItemCount is greater than the real number of children contained in SubGroup so I tried tSbuGroup->Items->Count but it is equal to ItemCount.

How can I know how many children are present in a group and how can I access them ?

Thanks.
Alex.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 15 November 2013 - 03:17 PM

Hi,

Maybe you are looking for ChildCount property?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 ag74

ag74
  • Members
  • 9 posts

Posted 15 November 2013 - 03:40 PM

Hello Boki,

Yes, ChildCount seems to be the one I was looking for.

Do I have to use it with tSbuGroup->Items->Item[ i ] or tSbuGroup->Item[ i ] ?

Best regards,
Alex.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 15 November 2013 - 05:35 PM

Hi Alex,

Please use Parent.Item[i]

.Items is a link to main (global) items array.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users