How to Change the Default Font of the Class BrowserLast reviewed: April 30, 1996Article ID: Q130500 |
The information in this article applies to:
SUMMARYThe Class Browser is a tool included with the Professional Edition of Visual FoxPro. It is a Visual FoxPro application (.APP file) that allows developers to browse visual class libraries. Because of the many options it provides, it is a helpful debugging tool. You can customize the Class Browser by modifying the properties and methods it exposes. This article explains how to change the default font of the Class Browser by using the SetFont() and Addin() methods.
MORE INFORMATIONYou can call the Class Browser interactively by choosing Class Browser from the Tools menu, or you can call it in a program by using this syntax:
DO BROWSER [WITH <class Library (VCX)|<object reference> [,<classname>]] -or- DO (_BROWSER)[WITH <class library (VCX)|<object ref.> [,<classname>}The Class Browser uses the MS Sans Serif font by default. You can, however, modify this font by using the SetFont() method of the Class Browser.
Method One: Control the Font InteractivelyUse the SetFont() method to modify the default font. Load the Class Browser and type the following from the Command window:
_oBrowser.SetFont('Arial',8) _oBrowser.SetFont(,10) _oBrowser.SetFont('Courier New') _oBrowser.SetFont('MS Sans Serif',8) Method Two: Modify the Default Font in an Add-in ProgramTo have the Class Browser use another default font, use the Addin method, which calls an add-in when a specific event occurs. This example hooks the BRWFONT.PRG to the Init event:
* Brwfont.prg LPARAMETERS oSource oSource.SetFont('Arial',8) RETURNTo install this add-in, execute the following code after the Class Browser is loaded:
_oBrowser.AddIn('My Font','brwfont','Init')The arguments used in this example specify the following:
REFERENCESFor more information about customizing the Class Browser, search for "Class Browser" or "Browsing Classes" and then "Customizing the Class Browser" in the Visual FoxPro Help menu.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |