//unigui移动开发例子
procedure TMainmForm.close_form; //关闭窗口
var
i: Integer;
begin
//检查panel里面有没有被吸附的控件
if UnimContainerPanel10.ControlCount > -1 then
begin
//循环检查panel
for i := 0 to UnimContainerPanel10.ControlCount - 1 do
begin
//检查panel里面有没有吸附窗体,重点是类名要TUnimJSForm ,我这边后续还要打开的,所以选择的是close,你们可以free释放
if UnimContainerPanel10.Controls[i] is TUnimJSForm then
(UnimContainerPanel10.Controls[i] as TUnimJSForm).Close;
end;
end;
end;
开发中遇到一个问题,想要动态关闭Tform窗体的,但是一直没效果,最后通过ClassName在网页中显示,发现原来要用TUnimJSForm类名才能正常调用。