Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: ListBox InteractiveChange
Thread ID: 209399 Message ID: 209531 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, December 29, 2008 12:44:11 PM         
   


>
> Comparing old and new value seems to work:
>
>
> CLEAR
> 
> LOCAL oForm as Form
> oForm = CREATEOBJECT('TestForm')
> oForm.Show(1)
> RETURN
> 
> DEFINE CLASS TestForm as Form
> 	AutoCenter = .T.
> 	AllowOutput = .F.
> 	dummy = 1
> *!*		PROCEDURE dummy_assign(newValue)
> *!*			? LOWER(PROGRAM())	&& runs twice on item move
> *!*			IF m.newValue <> Thisform.dummy
> *!*				? m.newValue
> *!*			ENDIF
> *!*			Thisform.dummy = m.newValue
> *!*		ENDPROC
> 
> 	ADD OBJECT List1 as Listbox WITH ;
> 		Left = 50, Top = 50, MoverBars = .T., ;
> 		ControlSource = 'Thisform.dummy'
> 	PROCEDURE List1.Init
> 		This.AddItem('One')
> 		This.AddItem('Two')
> 		This.AddItem('Three')
> 	ENDPROC
> 	PROCEDURE List1.InterActiveChange()
> 		? LOWER(PROGRAM())	&& runs twice on item move
> 		IF This.Value <> EVALUATE(This.ControlSource)
> 			? 'conditional InterActiveChange runs once only'
> 		ENDIF
> 	ENDPROC
> 	PROCEDURE List1.Valid()
> *!*			? LOWER(PROGRAM())  && does not run at all on item move
> 	ENDPROC
> 	PROCEDURE List1.When()
> *!*			? LOWER(PROGRAM())	&& runs twice on item move
> 	ENDPROC
> 
> ENDDEFINE
> 

>
>
> hth
> -Stefan

Thanks very much Stefan.

ENTIRE THREAD

ListBox InteractiveChange Posted by Russell Hill @ 12/28/2008 11:24:38 AM
RE: ListBox InteractiveChange Posted by Stefan Wuebbe @ 12/28/2008 2:36:41 PM
RE: ListBox InteractiveChange Posted by Russell Hill @ 12/29/2008 12:44:11 PM
RE: ListBox InteractiveChange Posted by tushar @ 12/28/2008 3:38:30 PM
RE: ListBox InteractiveChange Posted by Russell Hill @ 12/29/2008 12:43:35 PM
RE: ListBox InteractiveChange Posted by Yousfi Benameur @ 12/28/2008 7:49:26 PM
RE: ListBox InteractiveChange Posted by Russell Hill @ 12/29/2008 12:42:57 PM