本例子附有create tabel 及insert 数据的sql 及forms的源文件, 经测试可以直接运行。
运行界面如下:
点击查看大图trigger;WHEN-NEW-FORMS-INSTANCE:
set_window_PRoperty('window1', window_state, maximize);
declare
rg1 recordgroup;
t number;
uname varchar2(32);
BEGIN
:global.os := get_application_property(Operating_system);
rg1 := find_group('RG1');
if not id_null(rg1) then
delete_group(rg1);
end if;
uname := user;
:vdata := uname;
uname := lower(uname);
rg1 := create_group_from_query('RG1','select init,depth,lpad(substr(treeno,-1,2),2,''0'')''.''label,'''',data from menu order by treeno');
t := populate_group(rg1);
ftree.set_tree_property('TREE',Ftree.record_group, rg1);
--psize();
END;
trigger;WHEN-TREE-NODE-ACTIVATED:
DECLARE
htreeITEM;
node_valueVARCHAR2(100);
ftypevarchar2(8);
BEGIN
node_value:=Ftree.Get_Tree_Node_Property('TREE',:SYSTEM.TRIGGER_NODE,Ftree.NODE_VALUE);
ftype:=lower(substr(node_value,-1,3));
--ftype:='fmx';
ifnode_value'node'then
ifftype='fmx'then
call_form(node_value,no_hide);
elsifftype='sql'then --executethosesqlneednotparameter--
host('plus80w@':vdata,NO_SCREEN);
endif;
endif;
END;