Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids...my favorite subject..plus recursive calls
Message
De
03/07/2004 06:46:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/06/2004 11:41:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00916882
Message ID:
00920411
Vues:
19
Amembers() accesses combo control in a column too. Are you sure combo is there ?
I just tested using foxyclasses' UdfObjCollector and it showed all grid elements including the combo.
Haven't checked your code thoroughly but as I can see what you're doing wouldn't it be shorter to do :

thisform.SetAll('BackColor', gnActivate)

Cetin

>This code is called from the init of a base form....
>
>I included the code below. We have several uses for this in our base class the most import being that users get a visual que that they looking at historical data when the entire program changes color. The problem i am having stems from a combobox I have added to the grid which will not change color. On steping through the code I see the grid has column1-column4 as its members but each of the columns has only Header1 and TXT1 as their members even column4 which has the combobox added to it. So the code never gets to change the combobox color....Is this expected behavior or bug? Why would the combobox not show up as a member in AMEMBERS
>
>
>Thanks in advance,
>
>mike
>
>******************************************************************************** Code: base.vcx:frm.setcolors()
>*** Author: Michael S. Mitchell
>*** Date: 19 July 2001
>*****************************************************************************LPARAMETERS toReference
>LOCAL loObject, loCurrentObject, ;
> lcCurrentObject, lcBaseClass, ;
> lnNumberofMembers, I
>LOCAL ARRAY laMembers[1]
>DIMENSION laMembers[1]
>
>loObject = toReference
>lnNumberofMembers = AMEMBERS(laMembers,loObject,2)
>I = 0
>
>IF loObject.BaseClass $ 'Form#Container'
>loObject.BackColor = gnActivate
>ENDIF
>
>FOR I = 1 TO lnNumberofMembers
>*** Build the current object as a string
>lcCurrentObject = "loObject." + ALLTRIM(laMembers[I])
>*** macro expand the string to get an object reference
>loCurrentObject = &lcCurrentObject
>*** get the baseclass of current object
>lcBaseClass = loCurrentObject.BaseClass
>
>DO CASE
>
>CASE lcBaseClass $ 'Label'
>
>IF loCurrentObject.Backstyle > 0
>loCurrentObject.BackColor = gnActivate
>ENDIF
>
>CASE lcBaseClass $ 'Textbox#Combobox#Editbox#Listbox'
>loCurrentObject.DisabledBackColor = gnDeactivate
>
>CASE lcBaseClass $ 'Shape#Checkbox#Commandgroup#Optiongroup'
>loCurrentObject.Backstyle = 0
>CASE lcBaseClass == 'Page'
>
>IF RIGHT(ALLTRIM(lcCurrentObject),5) == 'PAGE1'
>loCurrentObject.BackColor = gnActivate
>This.setcolors(loCurrentObject)
>ELSE
>loCurrentObject.BackColor = gnDeactivate
>This.setcolors(loCurrentObject)
>ENDIF
>
>CASE lcBaseClass $ 'Form#Container' OR lcBaseClass = 'Pageframe'
>
>CASE lcBaseClass $ 'Form#Container#Pageframe#Grid#Column'
> This.setcolors(loCurrentObject)
>
>CASE lcBaseClass $ 'Header'
>*** Dont do anything to it
>
>ENDCASE
>
>ENDFOR
Ç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
Répondre
Fil
Voir

Click here to load this message in the networking platform