Home » Developer & Programmer » Forms » filtering in listbox
filtering in listbox [message #128559] Tue, 19 July 2005 07:12 Go to next message
priyravi
Messages: 41
Registered: July 2005
Member
Hi,

I have set of items in listbox. For eg,

abhisheke
abinav
abirami
arjun
arun
mini
meena
meenu
venkat
vinay

If I press 'a', names starting with 'a' should only be displayed in that list box[previously all names were there]. if I type 'ab' , names starting with 'ab' shd be displayed. If i type 'abi', abinav and abirami should be displayed. if i click back space, respective change shd happen. if i clear all the characters which i typed, then all the names should be there in that listbox,

If there any way for doing this? Pl help

Regards
Priya
Re: filtering in listbox [message #128590 is a reply to message #128559] Tue, 19 July 2005 11:04 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You are describing the LOV (List Of Values). Why not use that instead:
- create a text item instead of a list item.
- create a record group ( either with fixed values or with a query )
- create a LOV based on this record group and attach it to the text item (via the wizard or via the LOV's and the text item's properties.

You could place a button next to the item (and let the button invoke the LOV).

A lot less headache and debugging.

MHE
Re: filtering in listbox [message #128638 is a reply to message #128590] Tue, 19 July 2005 23:53 Go to previous messageGo to next message
priyravi
Messages: 41
Registered: July 2005
Member
Thanks for ur reply.

Actually, if I use LOV, separate window with find/ok/cancel button appears. I dont want that. I want the list alone. is there any way to remove those things?? If so, i can go for that.

Priya
Re: filtering in listbox [message #128648 is a reply to message #128638] Wed, 20 July 2005 00:28 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Define your item as a 'List Item', try all of the 'List Styles' (poplist, tlist, combo box) and see if you prefer any of those object's behaviour.

David

There are many things we don't like about Forms, but hey, its the tool with which we have to work and you use it to the best of your ability. Sometimes you just can't get it to look exactly the way a lower level tool is able to deliver your interface.
Re: filtering in listbox [message #128671 is a reply to message #128648] Wed, 20 July 2005 01:46 Go to previous message
priyravi
Messages: 41
Registered: July 2005
Member
Hi,

Pbm solved. To those who are interested in soln, i am attaching the code.

Following code works as per my rqmt.

--define cursor
select c_name is select ename from emp where ename like
:global.clicked_value || '%';
myindex number(2):=0;
begin
clear_list('list name');
for i in c_name loop
myindex:=myindex+1;
add_list_element('ur list name',myindex,i.ename,i.ename);
end loop;
end;


but it is working if v use global var.

Regards,
Priya
Previous Topic: One problem in form design
Next Topic: SQL Loader control
Goto Forum:
  


Current Time: Thu Sep 19 12:02:42 CDT 2024