Share via


Managing Projects with the Component Gallery

You can use the Component Gallery to create Projects and Applications and to manage their development. Use the Component Gallery to arrange components within the Component Gallery or use the templates, builders, and wizards in the Component Gallery to create the project or application you want.

To create a project or an application from the Component Gallery

  • Use the Application Wizard or New Application template in the Applications folder of the Visual FoxPro catalog.

For catalogs and folders, select tabs and options for the change you want to make. For details, see Component Gallery Options dialog box in Help.

You can move items in the right, Object, pane of the Component Gallery window to the desktop or to an open project or form. The Project Manager recognizes the item referenced by the Component Gallery item and places it in the proper location in the Project Manager. Component Gallery items placed on the desktop are nonfunctional. There is no desktop representation for the Database, Folder, and gallery items representing nonvisual files.

To move items from the Component Gallery

  1. In the right pane, click the item you want to move.

    The Move icon, located in the upper-left corner of the Component Gallery window, changes according to what item you select.

  2. Drag and drop the Move icon to the desktop or to an open project or form.

When the Component Gallery cannot find the original item represented by the gallery item, a Find dialog box opens so that you can locate the item.

The following table identifies the gallery items included in Visual FoxPro and their default behaviors.

Component Gallery Item Type Project Form Screen Controls
Class (_ClassItem)     6  
File (_FileItem)        
URL (_UrlItem)   1    
Form (_FormItem)   9 11  
Report (_ReportItem)   9 11  
Program (_ProgramItem)     11  
Menu (_MenuItem)   10 11  
Image (_ImageItem)   2 7 2
Sound (_SoundItem)   3    
Video (_VideoItem)   3    
ActiveX (_ActiveXItem)        
Data (_DataItem)   4    
Template (_TemplateItem) 5      
Catalog (_CatalogItem)     8  
Sample (_SampleItem)        
Project (_ProjectItem)     11  

1 – Add hyperlink class
2 – Add an image class or set a Picture property
3 – Add a multimedia class
4 – Add a grid class
5 – Depending on the type (for example, form) creates a new file and adds it to the project
6 – Creates an instance in Screen
7 – Sets the Visual FoxPro wallpaper
8 – Launches a new Gallery window with that catalog
9 – Add a Button class to launch a form/report
10 – Add a shortcut menu to a form
11 – Opens in a designer (modifies)

You can right-click on a selected item in the right, Object, pane to display an Item Shortcut menu containing all the action options for that item, including Add to Project or Add to Form options. Use the shortcut menu to modify or, in some cases, run the gallery item. The shortcut menus are characteristic for each type of gallery item. You can change some properties of the selected item by clicking Properties on the shortcut menu to open the Item Properties dialog box.

Organizing Visual FoxPro or Windows Components into User-Defined Groups

The Component Gallery folders represent an arbitrary grouping of gallery items. You can reassemble the gallery items using drag and drop or you can duplicate items into other folders. You can copy and rename a catalog or folder and reassemble the items it contains. There are few, if any, limits on how you can use, modify, or create catalogs or folders.

Reviewing and Modifying Classes

Because Component Gallery items represent real items that can be objects or classes, you can review or modify these classes by accessing the original object through the Component Gallery.

To review a class

  1. In the Component Gallery, right-click a class.

  2. On the shortcut menu, click View in Browser.

    This opens the Class Browser, so you can view the properties and methods of the selected class.

To modify a class

  1. In the Component Gallery, right-click a class.

  2. On the shortcut menu, click Modify.

    This opens the class in the Class Designer.

Creating and Modifying Forms

You can use the Component Gallery to duplicate or modify forms and to add forms and other gallery items to a project.

To create a form from the Component Gallery

  • Double-click any template or select New Form from the shortcut menu of any template in the Forms folder of the Component Gallery.

    -or-

    Double-click the Form Wizard in the Forms folder of the Component Gallery.

    -or-

    Select CreateForm from the shortcut menu of Component Gallery items in the Forms folder of the Component Gallery.

The default settings for catalogs and folders enable you to perform basic review and management with gallery items. If you want to modify characteristics of catalogs or folders, or if you want greater access to gallery properties, select Advanced editing enabled in the Component Gallery Options dialog box.

See Also

Using the Component Gallery | Component Gallery Catalogs | Development Productivity Tools | Customizing the Component Gallery | Component Gallery Object Members