Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox and moving items up and down in it
Message
 
 
To
14/03/2008 15:55:14
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Miscellaneous
Thread ID:
01302233
Message ID:
01302586
Views:
14
Hi Mike,

I'm confused. In wich event do you have code: InteractiveChange or OnMoveItem? Would it work if you remove the code?
Can you modify code below to demonstrate the problem?
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT list1 AS listbox WITH ;
		RowSourceType = 1, ;
		RowSource = "One,Two,Three, Four, Five, Six, Seven", ;
		Height = 217, ;
		Left = 12, ;
		MoverBars = .T., ;
		Top = 24, ;
		Width = 241, ;
		AutoHideScrollbar = 1, ;
		Name = "List1"

	PROCEDURE list1.OnMoveItem
		LPARAMETERS nSource, nShift, nCurrentIndex, nMoveBy
		DEBUGOUT PROGRAM(), nSource, nShift, nCurrentIndex, nMoveBy
	ENDPROC


	PROCEDURE list1.InteractiveChange
		DEBUGOUT PROGRAM()
	ENDPROC


ENDDEFINE
>
>Its the standard VFP listbox with MoverBars showing and the RowSource type is None. I'm using the list's AddListItem() method to populate it.
>
>Mike
>
>>>>
>>Are you refering to the standard ListBox with MoveBars=.T. or something else? If it's former, what is RowSource type?
>>
>>>
>>>I was wondering if you could help me with a related problem. I've got a mover list on a form. In the list's InteractiveChange event I put some custom code to set a flag that indicates something has changed (in order to prompt the user to save or throw away their changes).
>>>
>>>While this works, the issue that I'm having is that the list item being dragged with the mover button does not show while dragging. It will eventually appear at the new position, but, it just does not show while being dragged. I've tried putting a DODEFAULT(nSource, nShift, nCurrentIndex, nMoveBy) before and after my code but it does not help.
>>>
>>>Any idea what I could do to have it show while being moved?
>>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform