

This is because the EditField.LockTop, LockBottom, LockLeft, and LockRight properties are set to TRue.įigure 5.11. In Figure 5.11, the Window has been resized, and the EditField has changed sizes along with it. Figure 5.10 shows the Window in its natural state, without having been resized at all: The following figures illustrate how this works. If you lock the right side, the Control will stay the same size, but move to the right when the Window expands in that direction. If you lock all four sides, the Control will grow right along with the Window. When it is locked, it means that the distance between the Control's edge and the Window's respective edge remains constant. You can lock the bottom, top, left, or right side of the control to the Window's bottom, top, left, or right side. These properties determine what happens to the Control. When a Control is positioned on a Window, you will need to decide what you want to do in the event that a Window gets resized. LockBottom, LockLeft, LockRight, and LockTop Normally, you can adjust the size and position of the control by dragging it with your mouse, but you can also do it programmatically by setting these properties. The height and width of the control are specified by the Height and Width properties. Top (obviously) is the y coordinate (up and down) and Left is the x coordinate (left and right). Unlike MouseX and MouseY, Top and Left are measured in the coordinates of the Window. Even when the Control doesn't "look" like a rectangle (an Oval Control for instance), it's still shaped like a rectangle as far as REALbasic is concerned.

The RectControl ClassĪll user interface Controls are subclasses of the RectControl class, called such because all Controls are rectangular. The RectControl class is a subclass of the Control class, and this is the parent class of all user-interface Controls. The Control class contains properties, events, and methods that are common to all Controls. The base class for all controls is the Control class.

You are probably already familiar with Controls, even if you are not aware of it, because you interact with them every time you use an application.
