|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
How to focus a record in forms
Hi
I have multi rows form and I want to highlight current record in block. So when I move cursor to each row it will change color. How to do this I try use this code: declare cur_block varchar2(40) := :System.Cursor_Block; cur_itm varchar2(40); begin cur_itm := Get_Block_Property( 'my_block',FIRST_ITEM ); -- focus while( cur_itm is not null ) loop Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'hhh'); cur_itm := Get_Item_Property( cur_itm, NEXTITEM); end loop; --- How to retrive previus record to set it visual_atribute to normal?? |
|
#2
|
|||
|
|||
|
I solve problem by using:
post-record and when-new-instance-record triggers. But How to retrive amout of record fetch by query? Now code is: PRE-FORM intializing global.my_var := 0; -- in my_block trigger level POST-RECORD :GLOBAL.my_var := Get_Block_Property( 'my_block', CURRENT_RECORD); WHEN-NEW-INSTANCE-RECORD declare cur_block varchar2(40) := :System.Cursor_Block; cur_itm varchar2(40); begin cur_itm := Get_Block_Property( 'my_block', FIRST_ITEM ); -- focus if ( cur_itm is not null and :GLOBAL.my_var != 0) then while( cur_itm is not null ) loop Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'high'); cur_itm := Get_Item_Property( cur_itm, NEXTITEM); end loop; -- defocus cur_itm := Get_Block_Property( 'T_ALL', FIRST_ITEM ); while( cur_itm is not null ) loop Set_Item_Instance_Property( cur_itm, to_number(:GLOBAL.my_var), VISUAL_ATTRIBUTE, 'normal'); cur_itm := Get_Item_Property( cur_itm, NEXTITEM); end loop; end if; end; -- cheers |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > How to focus a record in forms |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|