Home All Groups Group Topic Archive Search About

Set Scroll position in a list box

Author
27 May 2005 9:49 PM
Marv Wade
I currently populate a list box,  (sorted is set to true)  with a group of.
names. There is a text box that allows  entering  a part of a name.  As the
name is entered the I remove all names not matching what has so far been
entered.

This works OK but I would like to modify it so that instead of removing the
non-matching names when information is entered into the text box the list
box is scrolled so that names that match  what has  been entered into the
text box will  appear at the top of the list box.

I have been unable to find any information on how this could be accomplished
I would appreciate any reference to who this can be done.

Mav

Author
27 May 2005 10:11 PM
Douglas Marquardt
Hi Marv:

Perhaps this is what your looking for:

http://support.microsoft.com/default.aspx?scid=kb;en-us;141027

hth,

Doug.


Show quoteHide quote
"Marv Wade" <N*@columbus.rr.com> wrote in message news:OGv0cYwYFHA.796@TK2MSFTNGP09.phx.gbl...
> I currently populate a list box,  (sorted is set to true)  with a group of.
> names. There is a text box that allows  entering  a part of a name.  As the
> name is entered the I remove all names not matching what has so far been
> entered.
>
> This works OK but I would like to modify it so that instead of removing the
> non-matching names when information is entered into the text box the list
> box is scrolled so that names that match  what has  been entered into the
> text box will  appear at the top of the list box.
>
> I have been unable to find any information on how this could be accomplished
> I would appreciate any reference to who this can be done.
>
> Mav
>
>
Author
27 May 2005 11:16 PM
Marv Wade
It's close but not exactly. The sample you referred to highlights the first
name matching the text box but that may be  at the bottom of the visible
portion of the list box.  What I want to do is to have the first matching
entry scroll to the top visible position of the list box.

This does, however, a marked improvement in the code I have been using to
display matches

Marv

Show quoteHide quote
"Douglas Marquardt" <no_spam@dummy.com> wrote in message
news:e$BJTkwYFHA.1368@tk2msftngp13.phx.gbl...
> Hi Marv:
>
> Perhaps this is what your looking for:
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;141027
>
> hth,
>
> Doug.
>
>
> "Marv Wade" <N*@columbus.rr.com> wrote in message
> news:OGv0cYwYFHA.796@TK2MSFTNGP09.phx.gbl...
>> I currently populate a list box,  (sorted is set to true)  with a group
>> of.
>> names. There is a text box that allows  entering  a part of a name.  As
>> the
>> name is entered the I remove all names not matching what has so far been
>> entered.
>>
>> This works OK but I would like to modify it so that instead of removing
>> the
>> non-matching names when information is entered into the text box the list
>> box is scrolled so that names that match  what has  been entered into the
>> text box will  appear at the top of the list box.
>>
>> I have been unable to find any information on how this could be
>> accomplished
>> I would appreciate any reference to who this can be done.
>>
>> Mav
>>
>>
>
>
Author
28 May 2005 1:35 AM
John Cleveland
"Marv Wade" <N*@columbus.rr.com> wrote in message
news:OpSOEKxYFHA.3584@TK2MSFTNGP12.phx.gbl...
> It's close but not exactly. The sample you referred to highlights the
> first name matching the text box but that may be  at the bottom of the
> visible portion of the list box.  What I want to do is to have the first
> matching entry scroll to the top visible position of the list box.
>
> This does, however, a marked improvement in the code I have been using to
> display matches
>
> Marv

I believe the TopIndex property is what you are looking for.


Show quoteHide quote
>
> "Douglas Marquardt" <no_spam@dummy.com> wrote in message
> news:e$BJTkwYFHA.1368@tk2msftngp13.phx.gbl...
>> Hi Marv:
>>
>> Perhaps this is what your looking for:
>>
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;141027
>>
>> hth,
>>
>> Doug.
>>
>>
>> "Marv Wade" <N*@columbus.rr.com> wrote in message
>> news:OGv0cYwYFHA.796@TK2MSFTNGP09.phx.gbl...
>>> I currently populate a list box,  (sorted is set to true)  with a group
>>> of.
>>> names. There is a text box that allows  entering  a part of a name.  As
>>> the
>>> name is entered the I remove all names not matching what has so far been
>>> entered.
>>>
>>> This works OK but I would like to modify it so that instead of removing
>>> the
>>> non-matching names when information is entered into the text box the
>>> list
>>> box is scrolled so that names that match  what has  been entered into
>>> the
>>> text box will  appear at the top of the list box.
>>>
>>> I have been unable to find any information on how this could be
>>> accomplished
>>> I would appreciate any reference to who this can be done.
>>>
>>> Mav
>>>
>>>
>>
>>
>
>
Author
28 May 2005 3:19 PM
Marv Wade
Ah, that is exactly what I was looking for.

Thanks.

Marv

Show quoteHide quote
"John Cleveland" <jwcl***@pacbell.net> wrote in message
news:gVPle.2216$kS3.1562@newssvr21.news.prodigy.com...
> "Marv Wade" <N*@columbus.rr.com> wrote in message
> news:OpSOEKxYFHA.3584@TK2MSFTNGP12.phx.gbl...
>> It's close but not exactly. The sample you referred to highlights the
>> first name matching the text box but that may be  at the bottom of the
>> visible portion of the list box.  What I want to do is to have the first
>> matching entry scroll to the top visible position of the list box.
>>
>> This does, however, a marked improvement in the code I have been using to
>> display matches
>>
>> Marv
>
> I believe the TopIndex property is what you are looking for.
>
>
>>
>> "Douglas Marquardt" <no_spam@dummy.com> wrote in message
>> news:e$BJTkwYFHA.1368@tk2msftngp13.phx.gbl...
>>> Hi Marv:
>>>
>>> Perhaps this is what your looking for:
>>>
>>> http://support.microsoft.com/default.aspx?scid=kb;en-us;141027
>>>
>>> hth,
>>>
>>> Doug.
>>>
>>>
>>> "Marv Wade" <N*@columbus.rr.com> wrote in message
>>> news:OGv0cYwYFHA.796@TK2MSFTNGP09.phx.gbl...
>>>> I currently populate a list box,  (sorted is set to true)  with a group
>>>> of.
>>>> names. There is a text box that allows  entering  a part of a name.  As
>>>> the
>>>> name is entered the I remove all names not matching what has so far
>>>> been
>>>> entered.
>>>>
>>>> This works OK but I would like to modify it so that instead of removing
>>>> the
>>>> non-matching names when information is entered into the text box the
>>>> list
>>>> box is scrolled so that names that match  what has  been entered into
>>>> the
>>>> text box will  appear at the top of the list box.
>>>>
>>>> I have been unable to find any information on how this could be
>>>> accomplished
>>>> I would appreciate any reference to who this can be done.
>>>>
>>>> Mav
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
28 May 2005 12:38 PM
J French
On Fri, 27 May 2005 17:49:48 -0400, "Marv Wade" <N*@columbus.rr.com>
wrote:

>I currently populate a list box,  (sorted is set to true)  with a group of.
>names. There is a text box that allows  entering  a part of a name.  As the
>name is entered the I remove all names not matching what has so far been
>entered.

If you do a Google Groups search for : virtual list box j french

Then you will find some fairly crappy code that turns a listbox inside
out.

What I think you would really like to do, is to /exclude/ the
definitely non matching names.

Keep the real data outside the Listbox, and manipulate an array of
numbers (pointers) into the total data set.