procedure TFormmain.TreeView1Change(Sender: TObject; Node: TTreeNode);
var
tv: string;
begin
tv:=treeview1.Selected.Text;
case tv of
'员工档案': Formarchives.show;
'人事调动': Formmanoeuvre.Show;
end;
//if tv='员工档案' then
//Formarchives.show; //if tv='人事调动' then
//Formmanoeuvre.Show;
end;
这样提示[Error] Unitmain.pas(87): Ordinal type required
[Error] Unitmain.pas(88): Incompatible types: 'Integer' and 'String'
用注销的那段代码执行是,点节某项时,form窗口显示的是:闪现一下就不见了,为什么呢?
var
tv: string;
begin
tv:=treeview1.Selected.Text;
case tv of
'员工档案': Formarchives.show;
'人事调动': Formmanoeuvre.Show;
end;
//if tv='员工档案' then
//Formarchives.show; //if tv='人事调动' then
//Formmanoeuvre.Show;
end;
这样提示[Error] Unitmain.pas(87): Ordinal type required
[Error] Unitmain.pas(88): Incompatible types: 'Integer' and 'String'
用注销的那段代码执行是,点节某项时,form窗口显示的是:闪现一下就不见了,为什么呢?
for i:=0 to PgcSysManage.PageCount-1 do
begin
PgcSysManage.Pages[i].TabVisible:=false;
if TrManage.Selected.Text=PgcSysManage.Pages[i].Caption then
begin
PgcSysManage.Pages[i].TabVisible:=true;
PgcSysManage.ActivePage:=PgcSysManage.Pages[i];
if i=1 then
begin
TblWindowsManage.Close;
TblWindowsManage.Open;
end;
end;
end;你的case语句是不是有问题~~~