Re: need advice for a forms problem
Date: 04 Jan 2001 02:38:31 GMT
Message-ID: <20010103213831.23885.00007543_at_ng-fs1.aol.com>
>
>what i want to do is to write a pl/sql procedure traversing ALL
>visible objects (e.g. fields, checkboxes, canvases, visual atributes,
>graphics, etc.) in order to manipulate their aperance and this form
>independant. the pseudeo code may look like this:
>
>loop throu all objects
>
> if object_type = 'canvas' then
> set background color;
> end if;
>
> if object_type = 'textfield' then
> set font;
> set fg_color;
> set bg_color;
> set bevel;
> end if;
>
> etc.
>
>end loop
>
>is this possible - and if so - how ???
>
>TIA
>
>
>Matthias
>
Do a loop within a loop...
outermost loop is over blocks...
get_form_property(:system.current_form, first_block) to get first one...
get_block_property(...,nextblock) to get next one. Stop when this is null...
[decide if you want first_block or first_naviagation_block]
within each block, use
GET_BLOCK_PROPERTY(...,FIRST_ITEM) to get the first item
GET_BLOCK_PROPERTY(...,LAST_ITEM) to get last item
start with first item, check it, then use GET_ITEM_PROPERTY(...NEXTITEM) to get the next one. Stop processing when the current item is the last item
I use this extensively; it sounds a bit complicated but it its not to bad. I would recommend calling a procedure for each item type so you can easily see what is happening, rather than stuffing all the code in one routine.
Hope this helps
Dan
Received on Thu Jan 04 2001 - 03:38:31 CET