Implementing grid control for Oracle Forms blocks is a long time dream for many Forms developers. But what is easy in some others products is not so easy in Forms (and vise versa, of course). Some of us, developers, thinks that this is not possible, some thinks that it does not needed, but where is truth?
At first, we must to know why we need it.
Someone can say that "it's cooooool!". But this is not an argument, at least for me.
Personally, I want to be able to add grid control for multi record blocks for a simple practical reason. Sometime ago one of my users call to me and say that he replace his old monitor with 640x480 resolution with new one (17" and 1024x768 resolution). But multi record blocks in my application still small and can't use new space.
And what I must say to him? That many other users still has old monitors and I don't want to design forms for each possible screen resolution?
Grid control needed!
Period
So, we will try to implement it!
Bad news here, that we can't fully implement grid control in Oracle Forms. We can't resize multi record block vertically. To do this, we must have something like
SET_ITEM_PROPERTY(..., NUMBER_OF_ITEMS_DISPLAYED, ...); and/or SET_BLOCK_PROPERTY(..., NUMBER_OF_RECORDS_DISPLAYED, ...); and SET_BLOCK_PROPERTY(..., SCROLLBAR_HEIGHT, ...);
Good news that we can do following:
SET_ITEM_PROPERTY(..., WIDTH, ...)
SET_ITEM_PROPERTY (..., POSITION & NEXT|PREVIOUS_NAVIGATION_ITEM, ...)
SET_BLOCK_PROPERTY(..., BLOCKSCROLLBAR_X_POS, ...)
Now, I want to share my expirience on this subject, and present
simple GRID utility.
Zip archive contain grid.pll library with pl/sql code,
grid.olb object library with requared form objects and
simple_grid.fmb demo form.
All code was designed in Forms 6i, but also worked in Forms 10G without any changes.
simple_grid.fmb demo formgrid.zip
grid.pll library in Forms Builder and compile it
grid.plx in FORMSXX_PATH
grid.olb object library in Forms Builder
simple_grid.fmb form in Forms Builder and compile it
simple_grid form
fp_grid.register_block ('_your_multi_record_block_name_');
fp_grid.when_mouse_down;
fp_grid.when_mouse_up;
08 September 2004