🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #755

Re: TDBLookupListBox - Moving items in list

#755
From: Daryl
Date: Tue, 05 Apr 2005 20:40
60 lines
3069 bytes
Yes, I have tried to do what you suggest but for me I had the following
problems.

The item selected (highlighted) in the listbox did not want to automatically
follow the record being moved say toward the top of the list and the control
appears to have no method to allow the programmer to select/highlight a
record in the list.

Also, I found it difficult to cleanly change the value being used to sort
the recordset.  It is easy enough to say decrement the value of the current
selected record but then you have to find the record of now the same value
and increment it.  This should be the prior record - when you code this to
me it looks clumsy and as I indicated the selected/highlighted record does
not move up in the list.  It seems to stay on the same record position in
the list ie if the third record is selected/highlighted then when it
supposed to move to position two in the list (it does) but the record now at
position three in the list is selected/highlighted.

I hope this makes sense, thanks for the response.

daryl

"John Scott" <jscott@kw.igs.net> wrote in message
news:4252b2b9@newsgroups.borland.com...
> Add another field to the dataset and use the data in this field to
> sort the data in the dataset. You can then manipulate the data in this
> field to change the sort order.
>
> John
> "Daryl" <developeracc@hotmail.com> wrote in message
> news:42525622@newsgroups.borland.com...
> >
> > Cross post - no responses from Compoment Using list...
> >
> > I would like to know if it is possible to allow a user to select a
> > record and then move its position in the list (either up or down) by
> > use of a button click.  Of course this list is derived from a
> > dataset.
> >
> > Example:
> > List contains.
> > Cars    12
> > Boats    10
> > Bikes    2
> >
> > Actions:
> > The user selects (highlights) Bikes  2
> > The user clicks the MOVE UP button
> >
> > Outcome:
> > The List now reads, and Bikes    2 is still highlighted.
> > Cars    12
> > Bikes    2
> > Boats    10
> >
> > Any help would be good.
> >
> > thanks
> > daryl
>
Technical Details
Message-ID: <4252f69e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42525622@newsgroups.borland.com> <4252b2b9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c95d01d80e9ee5ae
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Daryl" <developeracc@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <42525622@newsgroups.borland.com> <4252b2b9@newsgroups.borland.com>
Subject: Re: TDBLookupListBox - Moving items in list
Date: Wed, 6 Apr 2005 06:40:43 +1000
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 203.103.112.241
Message-ID: <4252f69e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1112733342 203.103.112.241 (5 Apr 2005 13:35:42 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail