Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IExplorerObject disable input
Message
De
28/03/2008 10:59:34
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/03/2008 10:35:55
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01305495
Message ID:
01306488
Vues:
6
>BTW, how does your a-A button function? Do you allow the user to keep clicking it and simply cycle thru the different text sizes? Oh, wait, I see you said a-A buttons (plural).

Here's the code:
	*---------------------------------------------------
	PROCEDURE BrowserSetFontSize(tnSize)
	*-- dn 06/03/2007
	LOCAL loBrowser AS "Shell.Explorer.2"
	loBrowser=THIS.oBrowser
	loDoc=loBrowser.DOCUMENT

	FOR EACH loStyle IN loDoc.stylesheets
		FOR i=0 TO loStyle.rules.LENGTH-1
			loRule=loStyle.rules(i)
			loRuleStyle=loRule.STYLE
			lcTag=loRule.selectorText
			IF EMPTY(THIS.oRules.GETKEY(lcTag))
				oRule=CREATEOBJECT("empty")
				ADDPROPERTY(oRule, "cSize", EVL(loRuleStyle.FONTSIZE, "10px"))
				ADDPROPERTY(oRule, "nSize", VAL(oRule.cSize))
				ADDPROPERTY(oRule, "cUnits", CHRTRAN(oRule.cSize,"0123456789.",""))
				THIS.oRules.ADD(oRule, lcTag)
			ELSE
				oRule=THIS.oRules.ITEM(lcTag)
			ENDIF
			oRule.nSize=oRule.nSize* tnSize
			THIS.browserfontsize=oRule.nSize
			IF NOT oRule.cUnits = "%"
				lcSize=ALLTRIM(TRANSFORM(oRule.nSize,"99999.99"))+oRule.cUnits
				loRuleStyle.FONTSIZE=lcSize
			ENDIF
		ENDFOR
	ENDFOR
So the A button calls this with 1.1, and the a button calls it with 0.9 - and I made the buttons as small as practicable. But then I already had an area with other controls, so I had space for it.

This.oRules is a collection.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform