Скачать книгу

the Presentation tab, a few interesting settings are available. For example, you can choose the shape of the search object as rounded or squared.

      In the following exercise, you add a Search Object to the Template sheet.

      Exercise 4.9: Adding a Search Object to the Template Sheet

      1. Add a new Search Object. Allow the search in All Fields.

      2. Presentation tab: Make sure that the appearance is set to Squared.

      3. Layout tab: Make sure that the Layer is set to Normal or Top. Click OK to confirm.

      4. Position the Search Object on the right side of the gray ribbon. Move Year and Month to the left if needed. Use Figure 4-5 as a visual guide.

      5. Save your work.

      Current Selections Box

      The Current Selections box allows users to see the current selections. Since all the numbers on the screen are only relevant in the context of the currently selected items, it’s extremely important to know what data is selected. In a way, this is a version of the “You Are Here” sign on a tourist map.

      Because of its importance, the Current Selections box should be present in a prominent place in most analytical applications – most commonly in the upper-left corner of the screen, above the list boxes.

      The Current Selections box comes predefined with several presentation settings. In most cases, it’s good enough to create the object and accept all the defaults.

      The Current Selections box consists of three columns with invisible, yet existing, boundaries – Fields, Field Values, and special Icons between them. Each currently selected field will be listed with the corresponding list of values, and the icons allow clearing or modifying the selection. An additional icon, not included by default, allows you to lock and unlock selections from the Current Selections box, which is less common.

      Resizing the Current Selections box is a bit tricky. It’s easy to make the object wider. In order to make it narrower and to avoid the horizontal scrollbar, you need to resize the three columns individually. The process is similar to resizing individual columns in a multi box. However, in the Current Selections box, you should resize the columns from the top of the column. Dragging the boundaries in the middle of the object doesn’t lead to the same effect.

      In the next exercise, you add a Current Selections box to the template.

      Exercise 4.10: Adding a Current Selections Box

      1. Create a new Current Selections Box. Accept all the defaults and click OK.

      2. Position the new object in the upper-left corner, just below the gray ribbon and above the list boxes, as it appears in Figure 4-5. Resize the object as needed to fit nicely in the available space.

      3. Save your work.

      Organizing and Arranging Objects on the Screen

      Now is the time to bring it all together and arrange all the objects neatly on the screen. In this section, you learn everything about moving, arranging, and copying objects in QlikView. You also arrange all the objects on the Template screen in a neat organized way, ready for prime time.

      Moving and Positioning QlikView Objects On the Screen

      The most basic way QlikView objects can be moved around and repositioned on the screen is simply by dragging the Caption bar of the desired object to a new location. Objects without a Caption bar (Year and Month, for example) can be moved by holding the Alt key and dragging the object using its center area.

      With a sufficient amount of hand-eye coordination, objects can be dragged to their desired locations and aligned manually. However, professional-looking applications require precise placement of objects.

      Get a Mouse!

      Our sincere advice to all laptop users – get a mouse! Unless you are a die-hard trackpad expert, you will discover that moving, cloning, and resizing objects involves a lot of dragging and dropping, which can be done much more comfortably with a mouse rather than a trackpad.

      When multiple objects are presented on the screen, they should be properly aligned, forming visible horizontal and vertical lines. Our eyes are looking for a sense of order and structure, and if we can’t find a well organized set of vertical and horizontal lines, we perceive the presentation as sloppy and unprofessional. For this reason, it’s extremely important to keep multiple objects on the screen well aligned and similarly sized. The following techniques can help you get pixel-perfect control over an object’s position and alignment:

      ● Move an object using keyboard shortcuts. Pressing Ctrl and one of the arrow keys will result in moving the object a single pixel at a time. Pressing Ctrl+Shift+Arrow will move the object 10 pixels at a time.

      ● Specify the exact pixel position and enter itmanually in the Caption tab of the Object Propertieswindow.

      ● In order to position a group of objects in a consistent way, use a set of object alignment tools, which you learn about in the next section.

      Aligning Multiple Objects

      QlikView offers a nice set of alignment tools that become available as soon as multiple objects are activated. Objects can be activated either by clicking the Caption bars of multiple objects one by one while holding the Shift key, or by “lassoing” a group of objects with the mouse. When lassoing, the objects need to be covered by the “lasso” completely, or they won’t be included in the multiple selection.

When working on moving, aligning, and resizing objects, it can be helpful to turn on the Design Grid. The Design Grid is a helper tool that shows a grid on the screen, helping to snap objects into place. When the Design Grid is on, active objects are outlined with a visible frame with eight “handles.” The frames let you see how much space is allocated for each object. The handles can be used to resize the object vertically, horizontally, and diagonally. In the process of “lassoing” multiple objects, the frames around the active objects help you verify what objects were in fact activated. The Design Grid can be turned on from the View menu, or using the corresponding icon on the Design toolbar, or with the keyboard shortcut Ctrl+G. See Figure 4-12.

c04f012.eps

Figure 4-12: Design toolbar

      Once the desired group of objects is activated, you can align them in a variety of ways – align to top, bottom, left, right, or center. You can also distribute the objects in a couple of ways – in a tight line with a few pixels between objects (Adjust), or by distributing the available space between the first and the last object in the group (Space). Alignment tools can be accessed by right-clicking the group of selected objects and selecting one of the alignment icons from the context menu. The same icons are available in the Layout menu and on the Design toolbar. See Figure 4-12.

      In the following exercise, you will align all the template objects and make the screen look nicely organized.

      Exercise 4.11: Aligning the Template Objects

      1. Turn on the Design Grid to make it easier to see object sizes.

      2. Lasso the three text objects on top of the screen – the icon, the heading, and the logo. Right-click and select Center Vertically.

      3. Lasso the gray ribbon and the three objects located on top of it, and also center them vertically. Make sure that the list boxes and the search object have approximately equal height. You may have to resize the search object for that.

      4. Select all the list boxes, the multi box, and the Current Selections box (use Shift-Click to select multiple objects). Right-click and select Align Left. Right-click again and select Adjust Top. Resize objects

Скачать книгу