Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowing when mover bars have been used on list box?

Status
Not open for further replies.

EMJULIAN

Programmer
Aug 14, 2002
45
US
Is there a way to know that the user had moved a list box entry with the mover bars? How can I tell when they've completed the operation and what listindex they moved to?

Thanks
Eve
 
In 7, it's pretty tricky. You have use the Mouse events and check the position of the mouse in the list. I'm pretty sure I wrote about how to do this stuff in the FPA Answers column a good while back. Let me see: looks like it was March, 2001.

Tamar
 
EMJULIAN

If your controlsource is a table, an alternative to using a listbox with mover bars would be a grid set up to simulate a listbox with a vertically orientated group of command buttons that facilitate navigation, cmdTop, cmdDown, cmdUp and cmdBottom.

An advantage is that you can send the current record to either top or bottom of the table.

The following snippit is from a cmdDown .Click() event
Code:
[COLOR=blue]SKIP 1 IN (lcAlias)
SCATTER NAME loNext

SKIP -1 IN (lcAlias)
SCATTER NAME loThis

GATHER NAME loNext

SKIP 1 IN (lcAlias)
GATHER NAME loThis

TABLEUPDATE(.T.,.T.,lcAlias)[/color]



FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.net
PDFcommandertm.co.uk
 
Thanks, the listbox is just a list, no table associated with it. I'll take a look at that March article you wrote Tamar.

If all else fails this feature will just have to wait until I get around to upgrading to 8! :)

Thanks again
Eve
 
I ended up using the InteractiveChange event and a cMOVED variable. After the interactive change I do the error check. Simple but it works for what I need to do.

Thanks for the help!
Eve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top