Hidden Secrets of the VFP IDE, Part 1 Cathy Pountney FoxPro has always had several different ways to do the same thing. How many times have you looked over the shoulder of another developer and said, "Hey! How did you do that?" In this series of articles, Cathy Pountney will uncover many ways to work within the IDE, especially those that aren't so obvious or aren't documented. You'll learn several different ways to improve your productivity. Even experienced developers are bound to learn something new. In Part 1 of this two-part series, I'll uncover many hidden secrets in several areas of Visual FoxPro. I'll discuss various designers, a few controls, the Property Sheet, the Document View, the Find dialog, IntelliSense, and several tools and utilities included with Visual FoxPro. In Part 2 of this series I'll reveal secrets of the Command window and several commands, and wrap up with a potpourri of hidden secrets. Report Designer Of course you knew I was going to start with my favorite designer, the Report Designer! Navigate between objects Edit an existing label Forms Designer Drilling into containers When you have containers nested within containers, you can use Ctrl+Shift+Click to drill to the deepest level. For example, if you have an optiongroup on a page of a pageframe, you can position your cursor over one of the optionbuttons, press Ctrl+Shift+Click, and VFP drills through the pageframe, and through the page, and through the optiongroup, and right into the optionbutton. Listbox and combobox controls The "/" character has special meanings when used in listboxes and comboboxes—see Table 1 for details. Table 1. Using the "/" character in listboxes and comboboxes.
Grid controls Grids have always been somewhat difficult to work with, especially for new developers, because some things just aren't intuitive. Adding controls The first thing you have to do is drill into the grid. Place your mouse over one of the rows of the column you want to change and press Ctrl+Click. Be sure you're on one of the data rows of the grid and not the header row. You now have the column active and you can use the Form Control toolbar to drag and drop the object you want into the column. When you drop the object on the column, it doesn't look like anything happened. However, if you look at the Property Sheet and drill into the column, you'll see that the original Text1 textbox is there as well as the object you just added. The CurrentControl property of the column is still set to Text1, which is why you don't see your object. If you were to change the CurrentControl property of the column to the name of the object you just added, the grid would show your object. However, if you don't really need the original Text1 textbox, you might as well get rid of it and not worry about having to set the CurrentControl property. Deleting controls Navigation The Property Sheet There are several different keyboard shortcuts for invoking, navigating, and setting values in the Property Sheet (see Table 2). Table 2. Keyboard shortcuts for invoking, navigating, and setting values in the Property Sheet.
|