🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #10061

Re: Zachowanie stanu w TreeView

#10061
From: NoCode
Date: Thu, 17 Nov 2005 12:44
31 lines
1864 bytes
Użytkownik "Wiktor Zychla"  napisał w wiadomości
>   if ( tSearchNode != null )
>    for ( int iLevel=1; iLevel<nodePathPart.Length; iLevel++ )
>    {
>     tSearchLevel = null;
>     foreach ( TreeNode tC in tSearchNode.Nodes )
>      if ( tC.Text == nodePathPart[iLevel] )
>      {
>       tSearchLevel = tC;
>       tSearchLevel.EnsureVisible();
>       tSearchLevel.Expand();
>       break;
>      }
>
>     if ( tSearchLevel != null )
>     {
>      tSearchNode = tSearchLevel;
>     }
>     else
>      break;
>    }


Znalazlem maly blad w tym kodzie. Mianowicie, jezeli przy tych petlach zostana 
te <breaki> program nie dojdzie do konca wezlow, wyskoczy po dwoch. Zamiana 
<break> na <continue> zalatwia sprawe.

PS. Trzeba tez wyrzucic EnsureVisible - bo inaczej kontrolka "podskakuje", chcac 
co chwila ustawic sie na "widzialny wezel".

Pozdrawiam 
Technical Details
Message-ID: <dlhtup$fev$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <dlf3ot$gkm$1@inews.gazeta.pl> <dlf5vq$ahk$1@nemesis.news.tpi.pl> <dlg7sm$mf5$1@inews.gazeta.pl> <dlgcmv$4tr$1@atlantis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "NoCode" <nocode@no-email.com>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Zachowanie stanu w TreeView
Date: Thu, 17 Nov 2005 13:44:05 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 32
Message-ID: <dlhtup$fev$1@inews.gazeta.pl>
References: <dlf3ot$gkm$1@inews.gazeta.pl> <dlf5vq$ahk$1@nemesis.news.tpi.pl> <dlg7sm$mf5$1@inews.gazeta.pl> <dlgcmv$4tr$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: ajn189.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1132231449 15839 83.25.247.189 (17 Nov 2005 12:44:09 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 17 Nov 2005 12:44:09 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-User: sirstacho
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit