Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding All Textboxes in Form
Message
De
05/09/2005 09:51:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/09/2005 09:43:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01045035
Message ID:
01046781
Vues:
52
Yes I can think of more, ie: Control, DataEnvironment ... You might never know what the next version of VFP would have as a container type class.
Cetin

>Why not ??
>Number of baseclasses is limited and they are known upfront.
>I simply prefer it this way. Makes code simplier.
>
>See how easy was to fix code below & add missing functionality u mentioned in yr previous mesage. (Drill down to include Command/Option Groups).
>
>I think that now only formsets are missing. I always hated & never used those... But I am gonna add them later today just to make it complete.
>
>Am I missing any other object that can contain objects available to VFP6 ?
>All I can think of are form's datasessions.
>
>***Fix in order to include Command/Option Groups
>
>local oGPRO
>oGPRO=createobject('ObjectScanner')
>oGPRO.scan_vfp()
>*oGPRO.scan_containtership(oFormReference)   &&valid call for
>
>
>***App GPRO
>define class ObjectScanner as shape
>
>    procedure scan_vfp
>        local i,oObj
>        i=1
>        do while type('_vfp.objects(i)') <> 'U'
>            oObj=_vfp.objects(i)
>            do case
>                case inlist(oObj.baseclass,'Form','Container','Toolbar')
>                    this.scan_containership(oObj)
>
>                *Case it is formset do we bother handling that ?
>
>                *Case it is collection then what ?   (I am with VFP6)
>
>                *Anything else ?
>
>                otherwise
>                    this.with_object(oObj)
>
>            endcase
>            i=i+1
>        enddo
>
>
>    procedure scan_containership
>        lparameters oParentContainer
>        local i,oControl
>        for each oControl in oParentContainer.controls
>            do case
>                case oControl.baseclass="Pageframe"
>                    for i = 1 to  oControl.pagecount
>                        this.scan_containership(oControl.pages(i))
>                    next
>
>                case oControl.baseclass="Container"
>                    this.scan_containership(oControl)
>
>                case oControl.baseclass="Grid"
>                    for i = 1 to  oControl.columncount
>                        this.scan_containership(oControl.columns(i))
>                    next
>
>                *** Addition to include Commandgroups and Optiongroups
>                case inlist(oControl.baseclass,'Commandgroup','Optiongroup')
>                    for i = 1 to  oControl.buttoncount
>                        this.with_object(oControl.buttons(i))
>                    next
>
>                otherwise
>                    this.with_object(oControl)
>
>            endcase
>        next
>        this.with_object(oParentContainer)
>
>
>    procedure with_object
>        lparameters oObj
>        wait wind 'Scanning object [' + oObj.name + ']' timeout 0.5
>
>
>enddefine
>
>
>
>Anyway as I said this code is just an open idea
>so perhaps by people commenting on it, will spark up
>creation of more functionality.
>
>Thks & Rgds++
>Sergio
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform