PROGRAM Paramscreen_Adv2; {-- *************************************************************************** -- ** Descr. : This script shows some advanced possiblities what you can do with -- ** the TParamScreen Object. Together with the paramscreen_adv1.p2s -- ** demo they show all possible Parameter Objects! -- *************************************************************************** -- ** 03/10/01 1.001.00 Initial Creation, sm@orcl-toolbox.com -- ** 04/10/01 1.002.00 Added more documentation to the source, sm@orcl-toolbox.com -- ***************************************************************************} VAR ps : TParamScreen; pb : tparamboard; i : integer; //Begin Main BEGIN //Create a Parameterscreen object ps := TParamScreen.create; //Add a board pb := ps.AddBoard('File Selection',picModules); //Add some items to the board pb.addparam(parFilename,'MYFILE','Filename','',''); pb.addparam(parSaveFilename,'MYFILESAVE','Save Filename','',''); pb.addparam(parPathname,'MYPATH','Start Path','',''); pb.addparam(parFiles,'MYFILES','Modules','xxx','All Oracle Forms Modules (*.fmb;*.mmb;*.pll;*.olb)|*.fmb;*.mmb;*.pll;*.olb|Oracle Forms (*.fmb)|*.fmb|Oracle PL/SQL Library (*.pll)|*.pll|Oracle Object Library (*.olb)|*.olb|Oracle Menue (*.mmb)|*.mmb|All Files (*.*)|*.*'); pb := ps.AddBoard('Database/PLSQL',picProperties); pb.addparam(parDatabaseLogon,'MYDATABASE','Repository Connect','scott/tiger@orcl',''); pb.addparam(parPLSQL,'MYPLSQL','New Trigger','BEGIN'+c_cr+' /* test */'+c_cr+' NULL;'+c_cr+'END;',''); //Set the PLSQL editor to a height of 160 pixels ps.parambyname('MYPLSQL').displayheight := 160; //Show the parameterscreen and check for the result to see if user canceled or not if ps.ShowParamScreen('Hello!')=TRUE then begin //The user pressed OK logadd('parameter values:'); //output all parameters with their value for i := 0 to ps.paramcount-1 do logadd(ps.param[i].name+' : '+ps.param[i].value); end else begin //The user pressed CANCEL logadd('Parameterscreen canceled!'); end; //Just to be correct we have to free the Parameterscreen object. //This is not absolutly necessary as all objects anyways get freed //internally when the script finishes. ps.free; END. //End Main