Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 18th, 2005, 10:18 AM   #1
quants
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 quants is on a distinguished road
Red face Trees & Checkboxes

I have the following procedure:

procedure CheckAllChildren(node:ttreenode);
var
CurrentNode:TTreeNode;
SiblingNode:ttreenode;
NumberOfChildren:integer;

a:integer;

begin

if node.HasChildren then
begin
numberofchildren:=node.Count;
currentnode:= node.Getfirstchild;
currentnode.Stateindex:=ccheck;

siblingnode:=currentnode;
for a := 1 to numberofchildren-1 do
begin
Siblingnode:= siblingnode.getNextSibling;
siblingnode.StateIndex:=2;
//checkallchildren(siblingnode);
end
end
end;

What i want is for all the children of Node to have a StateIndex of 2.
But when i click on the StateImage (during runtime) it comes up with something like:

"Debugger exception notification dialog box

Project xxxx raised exception class yyyyy with message 'zzzzzz'."


However if I expand the Node before I click on the StateImage it works fine.
I want to be able to change the StateIndex of child nodes without having to see them first.
Is this possible? If so how?

Cheers
Q
quants is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:40 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC