This content has been marked as final. Show 3 replies
Yes, this is possible by creating a Visual Attribute for each color you want to use then use the Set_Item_Instance_Property() built-in to assign the visual attribute to each item displayed in your multirecord block row. Unfortunately, you do have to set this each item displayed as there is no built-in to set the attribute for the entire row. I recomend you create a Forms Program Unit that takes the block name, row number and color as parameters to simplify your coding.
Which trigger to use to set the color depends on when you want the colors to change. If you are displaying records from a table, the Post-Query trigger is probably the best place. If you want the color to change as you are creating records then using a When-New-Record-Instance or When-Create-Record triggers. If querying exits records as well as adding new, then you will need a combination of the two.
Hope this helps.
thanks.. i have already done it up to some extent but as you specify rownum , is there anything in-built in form to get or to show row number in multi record block ?
is there anything in-built in form to get or to show row number in multi record block ?Yes, take a look at the Forms Help System on the following topics: SYSTEM.CURSOR_RECORD and SYSTEM.TRIGGER_RECORD. Also, if you look at the help for the Set_Item_Instance_Property built-in you will see that you can specify CURRENT_RECORD when you are calling this built-in on the block's current record.