Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with the collection class
Message
 
 
To
24/05/2005 13:57:13
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01017111
Message ID:
01017214
Views:
30
Ok, here is how I did it:
*---------------------- Location Section ------------------------
*   Library: 	Aformssearch.vcx
*   Class: 		Frmquicksearch  
*   Method: 	Activate() 
*----------------------- Usage Section --------------------------
*)  Description: 
*)

*   Scope:      Public
*   Parameters: 
*$  Usage:      
*$              
*   Returns:  
*--------------------- Maintenance Section ----------------------
*   Change Log:
*       CREATED 	05/24/2005 - NN 
*		MODIFIED
*----------------------------------------------------------------
DODEFAULT()
*thisform.SetAll('lRegister',.t.)
LOCAL laControls[1,3], lnI, lnNumberOfElements
lnI = 0
FOR EACH loObject IN thisform.Controls
    IF LEFT(m.loObject.name,1) = 'o' AND LOWER(m.loObject.Class) <> "csessionenvironment"
       lnI = m.lnI + 1
       DIMENSION laControls[m.lnI,3]
       laControls[m.lnI,1] = m.loObject.TabIndex
       laControls[m.lnI,2] = m.loObject.class
       laControls[m.lnI,3] = SUBSTR(m.loObject.name,2)
    ENDIF
next    

lnNumberOfElements = ALEN(laControls,1)

=ASORT(laControls,1,m.lnNumberOfElements) && Sort by TabIndex

FOR lnI = 1 TO m.lnNumberOfElements
    thisform.RegisterControls(laControls[m.lnI,2],laControls[m.lnI,3])
next
>>>Add() have eBefore, eAfter parameters
>>
>>Yes, so my question was: can I use TabOrder and eBefore?
>
>Ok:
>
>* loop
>ADD(,ContainerName+str(member.TabIndex))
>* endloop
>Collection.KeySort(2)
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform