Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change BackStyle of all labels on all forms.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00396482
Message ID:
00396486
Vues:
9
You're better off doing it properly. Subclass all the VFP standard classes. Subclass the label from there for your application. Change your application subclass label's backstyle. Change all labels to be based on this instead. While you're at it, I'd change all your controls to be based on subclasses.

That's the very first thing I teach when I'm doing tuition.

>I want to do the above...
>I tried the global scx changer in the files section with the following code:
>
>
>USE getfile('scx')
>*
>
>go top
>DO WHILE NOT EOF()
>	IF INLIST(UPPER(CLASS),'LABEL','EMBOSSEDLABEL','TEXTBOX','EDITBOX')
>		
>		mfind = 'BackStyle'
>		mreplacewith = ' = 0'
>		=fixit(mfind,mreplacewith)
>	ENDIF
>
>	SKIP
>
>ENDDO
>
>use
>
>
>*********************************
>FUNCTION fixit()
>PARA mfind,mreplacewith
>*
>mpos = AT(mfind,properties)
>IF mpos > 0
>	mtmp = properties
>	mbegstring = SUBSTR(mtmp,1,(mpos-1))
>	mmidstring = mfind+mreplacewith
>
>	mtmp = SUBSTR(mtmp,mpos+1)
>
>	mchr13 = AT(CHR(13),mtmp)
>	mendstring = SUBSTR(mtmp,mchr13)
>	m.properties = mbegstring+mmidstring+mendstring
>ELSE
>	m.properties = properties+CHR(13)+CHR(10)+mfind+mreplacewith
>ENDIF
>REPL properties WITH  m.properties
>RETURN
>
>*********************************
>
>
>
>It seems to never work.
>At first the BackStyle is at default so it is not inside the property sheet.
>When I run this code and then open the form it changes the property back to the default.
>Is there some way I can do this automated.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform