Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whats method fires when new items selected in listbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063349
Message ID:
01063356
Views:
9
>Hi! When a users selects/deselects item is a list box, I want to calculate & display how many are selected.
>
>What event fires as items are deselected? Interactive change does seem to work?
>
>Any help extremley appreciated

InteractiveChange works for me:
PUBLIC oform1

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


	**************************************************
*-- Form:         form1 (d:\works\traff\tte.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   10/30/05 04:57:04 PM
*
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT list1 AS listbox WITH ;
		Height = 190, ;
		Left = 40, ;
		MultiSelect = .T., ;
		Top = 28, ;
		Width = 168, ;
		Name = "List1"


	PROCEDURE Init
		FOR asd = 1 TO 10
		    this.List1.AddItem(TRANSFORM(asd))
		NEXT
	ENDPROC

        PROCEDURE list1.InteractiveChange
        LOCAL lnCount, lnFor
        lnCount = 0
        FOR lnFor = 1 TO thisform.List1.ListCount
            IF thisform.List1.Selected(lnFor)
               lnCount = lnCount + 1
            ENDIF
        NEXT
        WAIT WINDOW lnCount NOWAIT
    ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform