I need to search for TUniTreeMenu items, in TUniTreeView I use the following function ... already in TUniTreeMenu does not work
var
S, SString : string;
I : Integer;
aExpand : Boolean;
begin
SString := Trim(AText);
if SString<>PSString then
begin
PSString := LowerCase(SString);
if (Length(PSString) > 1) or (PSString = '') then
begin
aExpand := PSString<>'';
tvmMenu.BeginUpdate;
try
tvmMenu.ResetData;
for I := 0 to tvmMenu.Items.Count - 1 do
begin
S := LowerCase(tvmMenu.Items[I].Text);
tvmMenu.Items[I].Visible := (Length(PSString) = 0) or (Pos(PSString, S)>0);
tvmMenu.Items[I].Expanded := aExpand;
end;
finally
tvmMenu.EndUpdate;
end;
end;
end;
end;