Article View: borland.public.cppbuilder.nativeapi
Article #16559Re: Registry and TreeNodes
From: Remy Lebeau (TeamB)
Date: Wed, 07 May 2003 07:03
Date: Wed, 07 May 2003 07:03
27 lines
1851 bytes
1851 bytes
"Greg Stantin" <gstantin@stantonassoc.com> wrote in message
news:3eb88a85@newsgroups.borland.com...
> Is there any way that i can get the parent on level 1,
> without going to the actual root of the tree, i dont need
> the rootnode as the parent.
Simply iterate the Parent hierarchy until you find a TreeNode that has its
Level property set to 1:
void __fastcall TForm1::TreeView1Expanding(TObject *Sender, TTreeNode
*Node, bool &AllowExpansion)
{
if( Node->Level != 0 )
{
TTreeNode *ParentNode = Node;
while( (ParentNode) && (ParentNode->Level > 1) )
ParentNode = ParentNode->Parent;
AnsiString NameLBSelect = ParentNode->Text;
// ...
}
}
Gambit
Technical Details
Message-ID:
<3eb8af62$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!nntp5.savvis.net!uunet!dfw.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3eb88a85@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f0b277f95868ae0a X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-07 00:12:14 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3eb88a85@newsgroups.borland.com> Subject: Re: Registry and TreeNodes Date: Wed, 7 May 2003 00:03:41 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3eb8af62$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052290914 207.175.226.26 (7 May 2003 00:01:54 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.frii.net!newsfeed.frii.net!nntp5.savvis.net!uunet!dfw.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail