We have already encountered quite a few interesting items one can place on an InfoView. So far, we've seen:

Controls, which includes a whole palette of items
Labels that typically accompany Controls
Grids which we have examined in detail in the previous chapter

 

We will now take a closer look at some of the field Controls and see what, if anything, we can edit about them.

 

 

Label. This is perhaps the simplest of all items, but there's a trick even to this one. You can edit the Label's Caption simply by double-clicking it.

 

InfoViewLabelCaptionEditing1

 

The Caption "lets you in": you can adjust the text in the Text Box it has temporarily become. Just click somewhere outside the Label or hit Ctrl-Enter when you're done and the Label is updated.

 

Checkbox. While not a Label at all, it sort of looks like one, doesn't it? Editing its Caption therefore works exactly like editing a Label: just double-click it to edit.

 

Grid Column Caption. It's not a separate Item per se, but it works like a Label: double-click to edit.

 

 

Radio Button Group. Implementing a field using this control creates an empty Radio Group with no Buttons inside.

 

InfoViewRadioGroupEditingC2

 

The way you create the buttons that will correspond to whatever choices you want this Radio Group to present, is by getting "into" the Radio Group. You do this by double-clicking it right in the middle. This opens a little grid of Value/Caption pairs. The Value corresponds to the actual "real" value this Radio Group will store or retrieve from its underlying field, e.g., "NY"/"CA"/"TX" and so on. The Caption is the caption of the corresponding Radio Buttons, which in this case would be "New York"/"California"/"Texas", etc. Using this example, we'd fill the little grid to make it look like this:

 

InfoViewRadioGroupEditingB2

 

Once satisfied with the setup, you can close the mini-grid simply by clicking anywhere outside the Radio Group. This creates the Radio Buttons in the order in which you have listed the corresponding Value/Caption pairs.

 

InfoViewRadioGroupEditingA2

 

Note that you can't re-order the pairs at will, so you have to be very careful and organized as far as the order in which you enter them: start with the last Button, then insert the other ones. If you do find yourself in need of re-ordering the Radio Buttons, you can sort their list by either the Value or Caption column in ascending or descending order. If neither order produces the right results, here's a little tedious trick: edit the Captions so that their first character places them in the desired order (e.g., using the example above, you'd change them to "1New York"/"2California"/"3Texas" or similar). Sort by the Caption column and accept your changes. The order is now correct, but the Captions themselves aren't. Re-open the grid, and "fix" the Captions by taking out that first character. Re-apply the changes. The already-correct order has not changed, so now you have your correct Captions in correct order.

 

If you want to change the Radio Group's Caption, editing it works exactly as if it were a Label (see above): double-click, edit, click elsewhere or hit Ctrl-Enter. This is the only reason we told you earlier to double-click the Radio Group close to its center: in fact, you must double-click it anywhere outside the Caption area at the very top.

 

 

Immediate Lookup Combo. Since it performs essentially the same function as a Radio Group, it too requires a set of Value/Caption pairs, which are edited the same way: double-click the Combo Box.

 

 

Lookup Combo Box. We mentioned it here only for the sake of completeness, but we really don't want to talk about it until the chapter on Relational Tables. So, don't double-click it!

 

You have already seen a few other Controls, e.g., Calculator Edit Box. We are not listing them here simply because there's nothing to be edited about them at least not in a way similar to those we did list above.

 

 

BarDgnInsertSymbol Symbol Picker. This is not directly related to item editing, but you will most likely use it to enter fancy symbols into Label Captions and the like, so we'll mention it here. Basically, the Symbol Picker works exactly as it does in Alventis. The only difference is that in Alventis, entering a symbol belonging to a particular Character Set (e.g., Greek) would affect the Charset of the entire item (Text Box, etc.) into which you are entering it. In Designer, it doesn't. If you need to set the Charset of an item, you have to do so explicitly.

 

 

As you can see, quite a bit of useful stuff can be edited directly, "in-place", simply by double-clicking the corresponding item.

 

Let's see what other items we can create in Designer.

 

InfoViewStaticItemCreation1

BarDgnInsertPanel Panel. A Panel is a very important item. It allows you to place other items (including other Panels) onto it. Whatever is placed on a Panel will then "follow it around", i.e., move where it moves, gets resized with it, etc. We will talk much more about Panels and their usefulness in the chapter on Layout.

 

BarDgnInsertSplitPanel Split Panel. A Panel with a Splitter that separates it into two sub-Panels. Again, we'll leave it aside until we talk about Layout.

 

BarDgnInsertPageControl Page Control. This is the familiar multi-page control comprised of multiple Tab Sheets. A very different kind of item, and definitely the kind we want to set aside until the Layout chapter.

 

BarDgnInsertLabel Label. We have already seen many of those: they get automatically created to accompany most Controls that implement fields. You can create your own "independent" Labels too.

 

BarDgnInsertRectangle Rectangle. This is just a rectangle, no more, no less. Useful for surrounding logically-related Controls, for example. You can make its border or its inside area whatever color you want. To make them transparent, set the corresponding color to "None".

 

BarDgnInsertImage Image. This is just a static picture box: an item into which you can load a graphic file of your choice. It may be used for decorating your InfoView or whatever other esthetic purpose it may serve. Do not confuse this static Image item with a "real" Image Control based on a Graphic field! The former gets assigned some image for purely cosmetic purposes and never changes. The latter displays pictures stored in the Database table and allows you to save/load them. If an existing Image item is selected, invoking this command will assign a new graphic file to the existing item. Otherwise, a new Image item will be created with the picture of your choice. You can select one using the standard Open dialog you get if you click the button. The drop-down menu attached to it lists the most recently used pictures, so you can select frequently used ones from it directly.

 

BarDgnInsertLayoutTemplate Layout Template. This is not an item in any sense of the word, but inserting it is quite similar to inserting ordinary Panels described above. A Layout Template is simply the contents of any InfoView form that has no data-aware items and hence has not been "attached" to any table. This is really simpler than it sounds. Imagine you have devised a certain layout consisting of the above-mentioned non-data-aware items, such as Page Controls, Panels, Split Panels, Shapes, and perhaps even Labels. You may have arranged them in a certain magnificently complex structure with all sorts of clever Alignments and Anchors (that you will learn about in the next chapter). To reuse your work, you could certainly use Copy-and-Paste, but there's a better way. Simply click the Insert Layout Template button. This will open a list of InfoView forms that have not been attached to any data, which should therefore include the InfoView with that clever layout you want to reuse. Select the desired InfoView from the list and its entire contents is inserted into the currently selected Container. Like we said, this works very much like inserting a Panel or similar except that in this case you are inserting whatever was in the selected "template" InfoView.

Creating a Layout Template is therefore simple: just create an InfoView but do not place any data-aware items on it (i.e., do not drag any fields into it). You can create and save it attached to any Table you wish. You may find it convenient to create all Layout Templates under some particular table just to keep them together. This is up to you though since Designer will find all suitable InfoViews regardless of where you put them. You will find the several default ones under the Car Manufacturers table (simply because that table has the fewest "real" InfoViews).

 

The above represents absolutely all items you may place on an InfoView form. The list is not particularly long, so you should be able to quickly and easily master every available item.

 

We have intentionally avoided quite a few attributes of all these items. Some will be treated in the next chapter on Layout. Others will get what they deserve in a separate chapter dedicated to Item Formatting.