New topic: 

Listboxes and order changes

<http://forums.realsoftware.com/viewtopic.php?t=25796>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       McDian           Post subject: Listboxes and order changesPosted: 
Sat Dec 27, 2008 1:45 pm                        
Joined: Fri Sep 14, 2007 5:00 pm
Posts: 102              Okay first the foundation of the question:
Database Table = tblRoutes
Field = tblRoutes.recId
Field = tblRoutes.meterId
Field = tblRoutes.rtNum
Field = tblRoutes.rtSeq

How this works is simple, there are a specific number of meters assigned to 
each route, that number can increase or decrease or change position depending 
on some variables. These meters are all stored in tblRoutes with their 
appropriate route number and sequence (there are 16 routes and 1503 meters). 
What I am stumped on is moving the meter within the route to a new sequence 
position. 

Here is a sample of what I mean, I will use four meters to explain what I am 
attempting to do.

recId = 1
meterId = W09601
rtNum = 1
rtSeq = 1

recId = 2
meterId = W09602
rtNum = 1
rtSeq = 2

recId = 3
meterId = I09601
rtNum = 1
rtSeq = 3

recId = 4
meterId = E09601
rtNum = 1
rtSeq = 4

All four meters are in Route #1. As you can see each meter has it's own Meter 
ID and based on the sequence number is how they will appear on the reading 
device. Now let's say I need to move I09601 (rtSeq# 3) to position 1, I am 
running into a problem figuring out how to do this easily.

Right now my idea is to have two list boxes, one is loaded with a route and all 
meters assigned to it. The other is to be used to display the new order and 
assign the appropriate sequence number. So what I am thinking is that I want to 
be able to grab a meter or even a group of meters and drag them from one 
listbox to the other. When they are deposited in the other listbox their 
sequence numbers will be updated to reflect their new position.

Now that part I have sort of figured out. But I haven't got the click and drag 
part working yet... to be honest I don't even know where to start.

So I guess my first question is, does my explanation make sense? Am I clear on 
what I am attempting to do?
My next question is can I do this with the two listboxes as I think I can?

And if so then that will answer my other question about adding or deleting 
meters from a route.

As always thank you for your time and help! I have made great strides and 
believe it or not am close to my first beta test! Thank you and have a safe and 
happy holiday season!   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to