Home » Developer & Programmer » Forms » Overloading default form parameters.
Overloading default form parameters. [message #130347] Fri, 29 July 2005 08:11 Go to next message
kmadore
Messages: 2
Registered: July 2005
Junior Member
We need to overload the default form parameters when starting a form from the master menu, the purpose is to dynamically change the look/feel of the form as needed . The parameters for the form will be stored in a database table and pulled by a function (ie. formA set_window_property ('WINDOW1',position,50,50); formB set_window_property ('WINDOW1',position,10,10); ect). We are using 9i Forms.

Example.

Form A default position 3,3

From Main Menu
call function to check for formA parameters.
- Returns
-- set_window_property ('WINDOW1',position,50,50);
call form (('formA);

Next Time
From Main Menu
call function to check for formA parameters.
- Returns
-- set_window_property ('WINDOW1',position,50,50);
-- set_window_property ('WINDOW1', background_color,red)
call form (('formA);
Re: Overloading default form parameters. [message #130519 is a reply to message #130347] Sun, 31 July 2005 19:35 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do your 'set_window_property' in the When-New-Form-Instance trigger of the new form. The window movement done before the call will be over-ridden when the new form is called and its 'build' values are used. If you want the window to be in different places depending on from where the call was made, then you will need to either pass a parameter to the new form to say 'from where it came' or (groan) use a :global to do the same.

David

[Updated on: Mon, 01 August 2005 19:00]

Report message to a moderator

Re: Overloading default form parameters. [message #130639 is a reply to message #130519] Mon, 01 August 2005 14:11 Go to previous messageGo to next message
kmadore
Messages: 2
Registered: July 2005
Junior Member
I know that I can place the code the when-new-form-instance trigger for each form. But since we have over three hundred forms I was trying to find a better solution by placing the function at the main menu. Ideally I could pass the parameters and their values for the called form to pick up. As I mentioned in my example there may be one parameter the first time the form is called and five the next.

Any ideas/examples of how to code for this would be greatly appreciated.
Re: Overloading default form parameters. [message #130661 is a reply to message #130639] Mon, 01 August 2005 19:08 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
(IMHO) I KNOW the users REALLY want the windows to pop-up all over the place NOW, but I am confident that if you start all the forms at (0,0) they will get used to it.(/IMHO)

You could place a When-New-Form-Instance trigger in an object library that you attach to all forms which contains the 'set_window_property' and a call to the local when_new_form procedure in which any local WNFI logic is stored. But this would require changing the 300 forms, not a great start huh.

You can pass different numbers of parameters by using 'named parameter passing', so one or five parameters is not a problem. Just test for NULL before using then on the 'called' side.

David
Previous Topic: How to put OC4j instance automatic
Next Topic: Win_Api_Utility Error
Goto Forum:
  


Current Time: Thu Sep 19 23:40:45 CDT 2024