|
Numerieke
'derived'- en 'summary'-items rechts uitlijnen
Per definitie worden 'derived'- en 'summary'-velden
als links uitgelijnde VARCHAR2 text items gegenereerd.
Indien men wil dat deze rechts worden uitgelijnd, kan
men onderstaande procedure in de when-new-form-instance
aanroepen.
PROCEDURE align_items
IS
l_loop_block VARCHAR2(30) := get_form_property( name_in('system.form_name',
first_navigation_block);
l_item_id ITEM;
BEGIN
<< Blocks >>
WHILE l_loop_block != NULL
LOOP
l_item := get_block_property(l_loop_block , first_item);
<< Items >>
WHILE l_item != null
LOOP l_item_id := find_item(l_item);
/* Lijn numerieke derived en alle summary text items
rechts uit */
IF get_item_property( l_item_id , item_type ) = 'TEXT
ITEM'
AND
get_item_property( l_item_id , displayed ) = 'TRUE'
AND
( ( substr( get_item_property( l_item_id , item_name)
, 1, 4)= 'DRV_'
AND
get_item_property( l_item_id , datatype)
IN ( 'INT', 'RINT', 'MONEY', 'RMONEY' , 'NUMBER', 'RNUMBER'
)
)
OR substr( get_item_property( l_item_id
, item_name ), 1, 4) = 'SUM_' )
THEN
set_item_property( l_item_id , alignment, ALIGNMENT_RIGHT
); END IF;
END LOOP; -- Items
l_loop_block
:=
get_block_propery(l_loop_block, next_block);
END
LOOP; -- Blocks
END
align_items;
|