Article ID: 138979
Article Last Modified on 8/20/1999
** 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
Name - <enter a descriptive name for the builder> Descript - <enter a description for the builder> Type - MULTISELECT Program - Fntbldr.prg
Additional query words: vfoxwin
Keywords: kbcode KB138979