Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object List
Message
From
22/06/2001 08:09:27
 
 
To
22/06/2001 07:53:14
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00522334
Message ID:
00522340
Views:
10
Jimi,

I presume you are talking about enumerating the objects at design time, if this is the case then you can do this in a builder. The following article is available on MSDN and illustrates how easy it is to do this.
How to Create a Builder That Changes the Font of Form Objects 
Q138979
If you don't have access to the MSDN library then the sample basically uses the aselobj() function to build a list of object references that can be accessed at design time.
LOCAL lnNumObjs

lnNumObjs = aselobj(aObjlist)
The full MSDN example follows:-
** Builders must accept three parameters
   PARAMETERS a,b,c

   ** Create an array of object references for the selected objects
   numobjs=ASELOBJ(aobjlist)

   ** Bring up the standard Windows font dialog
   newfont=GETFONT()

   ** Make sure that the user chose a font
   IF ! EMPTY(newfont)

   ** Parse the string returned by GETFONT() to get name, size, and style
     newname=SUBSTR(newfont,1,AT(',',newfont,1)-1)
     newsize=VAL(SUBSTR(newfont,AT(',',newfont,1)+1,AT(',',newfont,2)-1))
     newstyle=SUBSTR(newfont,AT(',',newfont,2)+1)

   ** Loop through the array
     FOR i=1 TO numobjs

   ** Make sure the current object has font properties
     =AMEMBERS(aobjprops,aobjlist(i))
     IF ASCAN(aobjprops,'FONTNAME')>0

   ** Change the current object's font properties
          aobjlist(i).FontName=newname
          aobjlist(i).FontSize=newsize
          DO CASE
          CASE newstyle=="N"
               aobjlist(i).FontBold=.F.
               aobjlist(i).FontItalic=.F.
          CASE newstyle=="B"
               aobjlist(i).FontBold=.T.
               aobjlist(i).FontItalic=.F.
          CASE newstyle=="I"
               aobjlist(i).FontBold=.F.
               aobjlist(i).FontItalic=.T.
          CASE newstyle=="BI"
               aobjlist(i).FontBold=.T.
               aobjlist(i).FontItalic=.T.
          ENDCASE
     ENDIF
     ENDFOR
   ENDIF 
Previous
Reply
Map
View

Click here to load this message in the networking platform