Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Password font
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00710146
Message ID:
00712459
Views:
7
>Hi Maria,
>
>I don't know if WingDings is always installed. The only way to know if it's available would be to look for the ttf file in the computer's fonts directory.
>
>You could ask in one of the WIndows-related newsgroups if wingdings is always installed (as is the case with arial, courier new, and times new roman).
>
>Alex

Alex,

I was going to use aFonts() and complicate it a bit, but then Plinio Fermin got the dots using Tahoma.
So an example of all (known by me) possible Font/Passwordchar combinations, now including with Plinio's suggestion, is below.
Side comment: Max gave a VFP8 preview at the office and everybody is SO excited, VFP 8 Rocks and CursorAdapter rules! :)
oPW = CREATEOBJECT("frmpassword")
oPW.show(1)

DEFINE CLASS frmpassword AS form

	Height = 250
	Width = 200
	DoCreate = .T.
	Caption = "Password fonts"
	Name = "frmPassword"

	ADD OBJECT basetext7 AS basetext WITH ;
		FontName = "Tahoma",;
		Left = 48, ;
		Top = 162, ;
		Fontbold = .t.,;
		Fontsize = 10,;
		PasswordChar = CHR(0149),;
		Value = "asdf"

	ADD OBJECT basetext1 AS basetext WITH ;
		FontName = "Wingdings", ;
		Left = 48, ;
		Top = 23, ;
		PasswordChar = "l", ;
		Name = "Basetext1", ;
		Value = "asdf"

	ADD OBJECT basetext2 AS basetext WITH ;
		FontName = "Webdings", ;
		Left = 48, ;
		Top = 46, ;
		PasswordChar = ("="), ;
		Name = "Basetext2", ;
		Value = "asdf"


	ADD OBJECT basetext3 AS basetext WITH ;
		FontName = "Wingdings 2", ;
		Left = 48, ;
		Top = 70, ;
		PasswordChar = "•", ;
		Name = "Basetext3", ;
		Value = "asdf"


	ADD OBJECT basetext4 AS basetext WITH ;
		FontName = "Wingdings 2", ;
		Left = 48, ;
		Top = 93, ;
		PasswordChar = "–", ;
		Name = "Basetext4", ;
		Value = "asdf"


	ADD OBJECT basetext5 AS basetext WITH ;
		FontName = "Wingdings 2", ;
		Left = 48, ;
		Top = 116, ;
		PasswordChar = "—", ;
		Name = "Basetext5", ;
		Value = "asdf"


	ADD OBJECT basetext6 AS basetext WITH ;
		FontName = "Wingdings 2", ;
		Left = 48, ;
		Top = 139, ;
		PasswordChar = "˜", ;
		Name = "Basetext6", ;
		Value = "asdf"


ENDDEFINE
*
*-- EndDefine: frmpassword
**************************************************
DEFINE CLASS basetext AS textbox


	FontName = "Tahoma"
	FontSize = 8
	Height = 22
	Width = 100
	DisabledForeColor = RGB(0,0,0)
	*-- Holds original backcolor.
	origbackcolor = ""
	*-- Holds original forecolor.
	origforecolor = ""
	*-- Active back color 
	activebackcolor = (RGB(128,255,128))
	*-- Active forecolor 
	activeforecolor = 0
	Name = "basetext"

	PROCEDURE GotFocus
		IF EMPTY(THIS.origbackcolor)
			THIS.origbackcolor = THIS.BACKCOLOR
			THIS.origforecolor = THIS.FORECOLOR
		ENDIF

		THIS.BACKCOLOR = THIS.activebackcolor
		THIS.FORECOLOR = THIS.activeforecolor

		IF THIS.READONLY 
			SET CURSOR OFF
		ENDIF
	ENDPROC


	PROCEDURE LostFocus
		This.backcolor = This.origbackcolor
		This.forecolor = This.origforecolor 
		SET CURSOR ON
	ENDPROC


ENDDEFINE
Maria E. Zambrano
Previous
Reply
Map
View

Click here to load this message in the networking platform