4D v16

Handling form objects

Home

 
4D v16
Handling form objects

Handling form objects    


 

 

In addition to the manipulations explained in the video, you should also note that:

Shortcuts are an investment. The time you spend learning them is worth the subsequent time you save using them.

Saving time and optimizing can also be accomplished by:

  • drag and drop between two databases
  • duplicating forms, tables, and fields
  • using the object library to a form
  • and so on.

You'll save a lot of handling time this way.

In this video, we're going to learn how to save time handling objects.

As a developer, you have probably noticed that setting up the look and feel of your user interface is usually the most time-consuming part of your development phase. So far, we've already used several time-saving devices:

  • page 0
  • inherited forms
  • templates
  • and so on.

Now let's look at some key ways for optimizing in terms of:

  • selections
  • moving objects
  • and form navigation.

The right combination of shortcuts is the best way to go about it.

Let's close all the open windows: ALT-click on any window close box.

Then let's open page 0 of the navigation form.

In addition to the standard "Copy", "Paste" and "Select All", here are some essential tips for optimum efficiency:

To select all objects of the same type on a form page:

  • Right-click
  • Then choose "Select Similar Objects".
    You'll see that they're all selected automatically.

To set the properties of an object as the standard for all subsequent objects of the same type:

  • For example, a thermometer with a display of 80 to 90, with a blue-colored bold font
  • First, right-click on the object and choose "Use as Template"
    => then all future thermometers added will automatically have these same characteristics
  • We can set a template for each type of object.

To open the object method, we've already seen:

  • Alt+click on the object directly
  • or right-click to choose "Object Method"

To Select/Deselect several objects => Shift+click removes or adds an object to the selection.

To select with the mouse, you can just:

  • Draw a selection rectangle and all objects touched by it are included in the selection
  • Unless we hold down the ALT key while drawing the rectangle, in which case only objects that are completely inside the rectangle are included.

Here are a few more tips:

  • Use the arrow keys to move an object pixel by pixel
  • Holding down Shift + the arrow keys lets you move the object step by step (the step size is set in the Preferences)
  • Holding down Ctrl + the arrow keys (or Command on Mac) enlarges or reduces the object size
  • And when you hold down Ctrl+Shift with the arrow keys, the object is enlarged or reduced by one step size at a time.
  • To go directly to page 0 of a form, we've already seen => Alt + click on any object found on page 0 will take you straight there.
    However, the 2nd Alt+Click opens the object method.

You can also access tools using shortcuts.

We can let go of the mouse here.

If you press:

  • T: the Text type tool is selected
  • F: for access to the Fields and variables tool
  • L: for Listboxes
  • P: for Popup menus
  • B: for Buttons
  • R: for Radio buttons
  • C: for Check boxes
  • I: for Indicators
  • S: for drawing tools (such as rectangles, lines, circles, and more)
  • D: for splitters
  • X: for plug-ins
  • Z: for the zoom tool
  • H: for the hand tool used to move the form.
  • and for the arrow tool, you just click it directly.

The tool for entry order is different. When a specific entry order is required for a form, for instance in the case of an input form, this tool shows the order in which the objects will be tabbed. Of course, you can redraw it entirely and specify which objects are going to be accessed and in what order.

To restore the default order, just draw a frame around a couple of the fields and the original order is immediately restored (in other words, starting from top left to bottom right).

Implementing these shortcuts can save you a considerable amount of time when setting up forms.

 
 

 
PROPERTIES 

Product: 4D
Theme: Handling form objects

 
HISTORY 

 
ARTICLE USAGE

Self-training ( 4D v16)