شـكــ وبارك الله فيك ـــرا لك .
.. لك مني أجمل تحية .
							
						
					
.. لك مني أجمل تحية .
							
						
							
						
							
						
tbFound = Tree.FindAllNodesByText("Tree1", "0", Input.GetText("Input1"), false); 
for i,v in pairs(tbFound) do 
Tree.SetSelectedNode("Tree1", v); break 
end 
							
						

جيد  ....  
 موفقة 
							
						
يقوم  بتكرار  معيار البحث  في القائمة  الشجرية  و المحافظة على  معيار البحث الاول عند 
nItemCount = Tree.GetChildCount("Tree1", "0");
   for nCount=nItemCount, 1, -1 do
       Tree.RemoveNode("Tree1", nCount);
   end
----------------
sPDFRootFolder = _SourceFolder .. "\\tamer1";
Tree.FindAllNodesByText = 
function (strTree, strNode, strText, bExactMatch)
local tblItems = {};
local tbTree = Tree.GetChildren(strTree, strNode);
if tbTree then
for i,v in pairs(tbTree) do
if bExactMatch == false then
if String.Find(tbTree[i]["Text"], strText, 1, false) ~= -1 then 
bFound = true;
else bFound = false;
end
else
if tbTree[i]["Text"] == strText then
bFound = true;
else bFound = false;
end
end
if bFound then
Table.Insert(tblItems, Table.Count(tblItems) +1, tbTree[i]["NodeIndex"]);
end
if Tree.GetChildCount(strTree, tbTree[i]["NodeIndex"]) ~= -1 then
tbReturn = Tree.FindAllNodesByText(strTree, tbTree[i]["NodeIndex"], strText, bExactMatch);    
if tbReturn then
for i,v in pairs(tbReturn) do
Table.Insert(tblItems, Table.Count(tblItems)+1, v);
end
end
end
end
return tblItems;
else
return nil;
end
end  
File.Find(sPDFRootFolder, "*.pdf", true, false, nil, AddToTree);
PDF.LoadFile("PDF1", sFirstPDFToLoad);
----------------------------------------------------------------------
Input.SetText("Input1", ahmed);
Page.SetFocus("Input1");
Page.Redraw(); 
nItemCount = Tree.GetChildCount("Tree1", "0");
   for nCount=nItemCount, 1, -1 do
       Tree.RemoveNode("Tree1", nCount);
   end
----------------
sPDFRootFolder = _SourceFolder .. "\\tamer2";
Tree.FindAllNodesByText = 
function (strTree, strNode, strText, bExactMatch)
local tblItems = {};
local tbTree = Tree.GetChildren(strTree, strNode);
if tbTree then
for i,v in pairs(tbTree) do
if bExactMatch == false then
if String.Find(tbTree[i]["Text"], strText, 1, false) ~= -1 then 
bFound = true;
else bFound = false;
end
else
if tbTree[i]["Text"] == strText then
bFound = true;
else bFound = false;
end
end
if bFound then
Table.Insert(tblItems, Table.Count(tblItems) +1, tbTree[i]["NodeIndex"]);
end
if Tree.GetChildCount(strTree, tbTree[i]["NodeIndex"]) ~= -1 then
tbReturn = Tree.FindAllNodesByText(strTree, tbTree[i]["NodeIndex"], strText, bExactMatch);    
if tbReturn then
for i,v in pairs(tbReturn) do
Table.Insert(tblItems, Table.Count(tblItems)+1, v);
end
end
end
end
return tblItems;
else
return nil;
end
end  
File.Find(sPDFRootFolder, "*.pdf", true, false, nil, AddToTree);
PDF.LoadFile("PDF1", sFirstPDFToLoad);
----------------------------------------------------------------------
Input.SetText("Input1", ahmed);
Page.SetFocus("Input1");
Page.Redraw(); 
nItemCount = Tree.GetChildCount("Tree1", "0");
   for nCount=nItemCount, 1, -1 do
       Tree.RemoveNode("Tree1", nCount);
   end
----------------
sPDFRootFolder = _SourceFolder .. "\\tamer3";
Tree.FindAllNodesByText = 
function (strTree, strNode, strText, bExactMatch)
local tblItems = {};
local tbTree = Tree.GetChildren(strTree, strNode);
if tbTree then
for i,v in pairs(tbTree) do
if bExactMatch == false then
if String.Find(tbTree[i]["Text"], strText, 1, false) ~= -1 then 
bFound = true;
else bFound = false;
end
else
if tbTree[i]["Text"] == strText then
bFound = true;
else bFound = false;
end
end
if bFound then
Table.Insert(tblItems, Table.Count(tblItems) +1, tbTree[i]["NodeIndex"]);
end
if Tree.GetChildCount(strTree, tbTree[i]["NodeIndex"]) ~= -1 then
tbReturn = Tree.FindAllNodesByText(strTree, tbTree[i]["NodeIndex"], strText, bExactMatch);    
if tbReturn then
for i,v in pairs(tbReturn) do
Table.Insert(tblItems, Table.Count(tblItems)+1, v);
end
end
end
end
return tblItems;
else
return nil;
end
end  
File.Find(sPDFRootFolder, "*.pdf", true, false, nil, AddToTree);
PDF.LoadFile("PDF1", sFirstPDFToLoad);
----------------------------------------------------------------------
Input.SetText("Input1", ahmed);
Page.SetFocus("Input1");
Page.Redraw(); 
  و  تهذيبا للاكواد حمل  الملف   مصحح ومختصر
							
						
تعليق