>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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao