你找lxh,他做过消息的例子。
你只要在消息处理里做这个就行
//lixy
procedure TSTANDARDSTYLEMAINFORM.openmemu(Sender: TObject);
var
i,j:integer;
begin
for i:=0 to tbFuncTree.Count-1 do
begin
if tbFuncTree.Items.Caption= '客户关系' then
begin
tbFuncTree.Index:=i;
for j:=0 to FFuncNavBar.Groups.Count-1 do
begin
if FFuncNavBar.Groups[j].Caption='产品管理'then
FFuncNavBar.Groups[j].Expanded := True;
end;
end;
end;