1

Topic: ORACLE FORMS - GET_ITEM_PROPERTY

Greetings to All!
Question such: I need to change colors of an element and then to return them reversely.
I do saving of the initiating
:global. ITEM_Foreground_Color: = GET_ITEM_PROPERTY (fId, Foreground_Color);
:global. ITEM_BACKGROUND_COLOR: = GET_ITEM_PROPERTY (bId, BACKGROUND_COLOR);
Then I put color
SET_ITEM_PROPERTY (fId, Foreground_Color, ' r255g15b15 '); - RED
SET_ITEM_PROPERTY (bId, BACKGROUND_COLOR, ' r255g240b80 '); - YELLOW
And then I want to return reversely
SET_ITEM_PROPERTY (fId,Foreground_Color,:global.ITEM_Foreground_Color);
Also does not quit.
Prompt, please, where I here am mistaken?

2

Re: ORACLE FORMS - GET_ITEM_PROPERTY

HelpMePls wrote:

also does not quit.

And what does it look like?

3

Re: ORACLE FORMS - GET_ITEM_PROPERTY

Council. Instead of:global, use package variables.

4

Re: ORACLE FORMS - GET_ITEM_PROPERTY

Simply does not change color.
Though if in the beginning on the contrary to install colors. Then these:Global I deduce that through alert (instead of )
al_pId: = Find_Alert (' My_Alert ');
Set_Alert_Property (al_pId, alert_message_text, in_ErrorMessage);
Set_Alert_Property (al_pId, TITLE, in_ErrorTitle);
n_pButton: = Show_Alert (al_pId);
To me shows ' r250g15b15'
All is normal.
But that is why in the beginning (without changing color of an element) launching GET_ITEM_PROPERTY it does not return color of elements.
And when already changed their itself through SET_ITEM_PROPERTY then he them sees through GET_ITEM_PROPERTY

5

Re: ORACLE FORMS - GET_ITEM_PROPERTY

mcureenab wrote:

Council. Instead of:global, use package variables.

Package  the such?
DECLARE
backcolor varchar2 (20);
Begin
End;

6

Re: ORACLE FORMS - GET_ITEM_PROPERTY

DECLARE
ITEM_Foreground_Color varchar2 (20);
ITEM_BACKGROUND_COLOR varchar2 (20);
begin
ITEM_Foreground_Color: = GET_ITEM_PROPERTY (' DB_MAIN.OBSCHV_NOM_CHASTI ', Foreground_Color);
ITEM_BACKGROUND_COLOR: = GET_ITEM_PROPERTY (' DB_MAIN.OBSCHV_NOM_CHASTI ', BACKGROUND_COLOR);
------------------
--Displays NOTHING
ShowDebugInfo (' 1:F ', ITEM_Foreground_Color);
ShowDebugInfo (' 2:B ', ITEM_BACKGROUND_COLOR);
----------------------------------------------------
SET_ITEM_PROPERTY (' DB_MAIN.OBSCHV_NOM_CHASTI ', Foreground_Color, ' r255g15b15 '); - RED
SET_ITEM_PROPERTY (' DB_MAIN.OBSCHV_NOM_CHASTI ', BACKGROUND_COLOR, ' r255g240b80 '); - YELLOW
SET_ITEM_PROPERTY (' DB_MAIN.OBSCHV_NOM_CHASTI ', Font_Weight, FONT_BOLD); - FONT BOLD
------------------
--Displays ' r255g15b15 ' and ' r255g240b80 ' to soot th
ShowDebugInfo (' 1:F ', ITEM_Foreground_Color);
ShowDebugInfo (' 2:B ', ITEM_BACKGROUND_COLOR);
----------------------------------------------------

7

Re: ORACLE FORMS - GET_ITEM_PROPERTY

HelpMePls wrote:

But that is why in the beginning (without changing color of an element) launching GET_ITEM_PROPERTY it does not return color of elements.
And when already changed their itself through SET_ITEM_PROPERTY then he them sees through GET_ITEM_PROPERTY

,  colors simply are not set, and inherited from ancestors of an element. After you explicitly installed values of colors, you can receive them back.
in Designer' explicitly to register colors of elements.

8

Re: ORACLE FORMS - GET_ITEM_PROPERTY

Try  Set_Item_Instance_Property + VISUAL_ATTRIBUTE
So works, color of an item changes in some line on a condition

 if count_not_pay_doc <> 0 then
Set_Item_Instance_Property (' LS.NM_CA ', CURRENT_RECORD, VISUAL_ATTRIBUTE, ' VC_RED_WHITE ');
else
Set_Item_Instance_Property (' LS.NM_CA ', CURRENT_RECORD, VISUAL_ATTRIBUTE, ");
end if; 

9

Re: ORACLE FORMS - GET_ITEM_PROPERTY

Probably it is specificity Formsov.
I delivered explicitly background color (which by default was - By DEFAULT) and normally it received through GET_....
Even changing the design circuit  on the color form do not change (which earlier have been installed as By DEFAULT)
all is strange, but an output one we want to receive color - to set it is necessary explicitly.