1. Overview
This blog explains about, How to Set Current Record Color -Multi Color.
2. Technologies and Tools Used
The following technology has been used to achieve the same.
Ø Oracle FORMS
3. Use Case
- Create a Simple Tabular Block
- Create Visual Attribute with color Gray -Name it as ODD
- Create Visual Attribute with color Blue -Name it as Event
- In When-New-Record-InstanceCreate a Procedure
4. Architecture
Oracle FORMS
- FORM Builder
5. Examples
Step 1: Create one procedure in forms.
Code:
PROCEDURE Visual_attribute_dis_alt_rec
IS
cur_itm VARCHAR2 (80);
cur_block VARCHAR2 (80) := :SYSTEM.Cursor_Block;
curr_record NUMBER;
BEGIN
cur_itm := GET_BLOCK_PROPERTY (cur_block, FIRST_ITEM);
WHILE (cur_itm IS NOT NULL)
LOOP
cur_itm := cur_block || ‘.’ || cur_itm;
Curr_record := :SYSTEM.Cursor_Record;
IF MOD (curr_record, 2) = 1
THEN
SET_ITEM_INSTANCE_PROPERTY (cur_itm,
CURRENT_RECORD,
VISUAL_ATTRIBUTE,
‘ODD’);
ELSE
SET_ITEM_INSTANCE_PROPERTY (cur_itm,
CURRENT_RECORD,
VISUAL_ATTRIBUTE,
‘EVENT’);
END IF;
cur_itm := GET_ITEM_PROPERTY (cur_itm, NEXTITEM);
END LOOP;
END;
Step 2: Run the form in application.
It will highlight the records with multi color.
6. Conclusion
We can Set Current Record Color -Multi Color.