Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Font Object in VFP
Message
 
 
To
12/10/2001 11:30:04
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00567657
Message ID:
00567678
Views:
21
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>In my current project, I have to use a control designed for vb environment. One of the control properties is the Font property. When I use the control in vfp, the property value is mark as Object. There is a button with three dot caption in the Property window which brings up the font dialog box. Problem arise when I need to assign this property in run time (programmatically). I don’t know much about vb, but I think, in vb I can do this with these commands:
> Dim oFont AS StdFont
> WITH oFont
> .Bold = True
> .Name = “Arial”
> ENDWITH
>Then assign it to other object:
> Set Text1.Font = oFont
>
>How can I do this with VFP? I need to create a font object then assign it to the active-x control font property. I tried GETFONT() in vfp, but it returns strings instead of object compatible with font object.
>
>TIA

What happens when you attempt to access the properties of the object at run time? Ex.
With MyControl.Font
   .Name = "MS Sans Serif"
   .Bold = .T.
   .Size = 8
Endwith
I do this when I use the Treeview control in VFP and the setup is exactly as you describe.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform