SunQuest
           Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old May 31st, 2004, 09:07 AM
Tomasz Morus Tomasz Morus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 20 Tomasz Morus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 28 sec
Reputation Power: 0
Send a message via ICQ to Tomasz Morus
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??

Reply With Quote
  #2  
Old June 1st, 2004, 02:05 AM
Tomasz Morus Tomasz Morus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 20 Tomasz Morus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 28 sec
Reputation Power: 0
Send a message via ICQ to Tomasz Morus
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > How to focus a record in forms


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway