Home » Developer & Programmer » Forms » tooltip_text on multiple record data block problem
tooltip_text on multiple record data block problem [message #138184] Tue, 20 September 2005 11:26 Go to next message
zailsingh
Messages: 4
Registered: September 2005
Junior Member
Hi - Im trying to use the Tooltip_text property using set_item_instance on a datablock that has multiple records. The problem Im facing is that it only assigns the property to the first record of that block. below is the code.

DECLARE
var_short_description varchar2(20);
--Declare cursor
BEGIN
go_Block('validation_type');
OPEN c1;
LOOP
FETCH C1 INTO :validation_type_id, var_short_description
EXIT WHEN c1%NOTFOUND;
:short_description := var_short_description;
SET_ITEM_PROPERTY('SHORT_DESCRIPTION', TOOLTIP_TEXT,var_short_description);
SET_ITEM_INSTANCE_PROPERTY('SHORT_DESCRIPTION',CURRENT_RECORD, insert_allowed,PROPERTY_FALSE);
next_record;
END LOOP;

When I run this it assigns the value of the last record of the cursor to the first item of the block(short description). Can u suggest what am I doin wrong. Thanks...
Re: tooltip_text on multiple record data block problem [message #138238 is a reply to message #138184] Tue, 20 September 2005 18:41 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Actually, you are doing nothing 'wrong', but unfortunately, Forms is not constructed to give you that which you desire directly as tooltip is associated with an 'item' not an 'item instance'.

Consider using when-new-record-instance to populate tooltip using set_item_instance. But this will give the same tooltip for all of the 'item' entries. Alternatively, if your network can handle it, try using the when-mouse-enter trigger to populate the tooltip. I don't know which fires first - the tooltip popup or the when-mouse-enter, but I would expect the latter.

David
Re: tooltip_text on multiple record data block problem [message #138380 is a reply to message #138238] Wed, 21 September 2005 10:43 Go to previous messageGo to next message
zailsingh
Messages: 4
Registered: September 2005
Junior Member
Hi David - I tried the later option you suggested i.e. when mouse enter. But that also dosent seem to work as it is not assigning the tool tip to the instance. I believe tooltip popup is fired before the when mouse enter.

Can we then say that there is no way to uniquely identify each item in a block of multiple instances? and thus no way to prodive a tool tip to each item on the multiple record block.

rgds
Re: tooltip_text on multiple record data block problem [message #138424 is a reply to message #138380] Wed, 21 September 2005 21:56 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Thank you for testing my first suggestion. Pity it didn't work.

"Can we then say that there is no way to uniquely identify each item in a block of multiple instances? and thus no way to prodive a tool tip to each item on the multiple record block." Yes we can uniquely identify each item but tooltip lives at the set_item_instance level so it can only be set at that level.

David
Previous Topic: applying enter query logic
Next Topic: Cursor problems in Developer Forms 6.0
Goto Forum:
  


Current Time: Fri Sep 20 02:00:37 CDT 2024