PDA

View Full Version : Tree HelpMe please


byserkann
04-25-2007, 06:59 AM
Hello, I am Serkan
Subject: help tree1

Auto Media PlayStudio

http://img87.imageshack.us/img87/3782/treehelpmeix2.png

İf Tree1.selected=A then
Message("B");
end

İf Tree1.selected=B then
Message("B");
end

Please Help me

Thanks You

Desrat
04-25-2007, 10:20 AM
add this to the tree's on select event

--Returns the selected node index as a string vale
sSelected = Tree.GetSelectedNode( "Tree1");
--convert the result ot a number string
nSelected = String.ToNumber(sSelected); --returned values for A and B are ------ 1.1 = A and 1.2 = B
-- test for A
if nSelected == 1.1 then Dialog.Message( "Notice", "A", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--was not A test for B
elseif nSelected == 1.2 then Dialog.Message( "Notice", "B", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--was not B show fault message
else Dialog.Message( "Notice", "fault", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end output enhanced with AMS Code Pretty (http://www.indigorose.com/forums/showthread.php?t=19409)

byserkann
04-26-2007, 05:15 AM
add this to the tree's on select event

--Returns the selected node index as a string vale
sSelected = Tree.GetSelectedNode( "Tree1");
--convert the result ot a number string
nSelected = String.ToNumber(sSelected); --returned values for A and B are ------ 1.1 = A and 1.2 = B
-- test for A
if nSelected == 1.1 then Dialog.Message( "Notice", "A", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--was not A test for B
elseif nSelected == 1.2 then Dialog.Message( "Notice", "B", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--was not B show fault message
else Dialog.Message( "Notice", "fault", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end output enhanced with AMS Code Pretty (http://www.indigorose.com/forums/showthread.php?t=19409)
:) Ok, Thanks

zoya
05-15-2007, 01:20 AM
hellllo...

I'm a new member and i want to ask about same thing but in different way..

if i want to use the tree with button ..i mean i want to select some thing in the tree and then press the button and the program will open a file when i do this step????

can you help me pleaseeeeeeeee

zoya