> Is there an example in the RRBYW list of these > anchors? I think Razzak posted info about where to look for an example. Here's a brief description:
Any control can be "anchored" to the top, left, bottom, and right of the form, or to any combination. A control that is anchored to a side of the form with always stay the same distance away from that side, even when you resize the form. By default, controls are anchored to the top and left sides. Here's how you can create different effects using the anchors. Let's say you place button labelled "OK" in the lower right hand corner of a form, and you want it to stay in the lower right hand corner no matter what happens to the form. You would set anchors for Bottom and Right, and turn off the anchors for Top and Left. Now, when you resize the form, that button is "glued" to the lower right hand corner of the form. Let's say you have a few fields on top the form, and then a DBGrid on bottom. If the form expands in size, you want the DBGrid to grow to fill the space. You would anchor the DBGrid to the Top, Right, Bottom, and Left of the form. When the form grows, the left side of the DBGrid is "glued" to the left side of the form and the right side is glued to the right side of the form. R:Base resolves this be growing the DBGrid to the appropriate size. By choosing the correct anchors you can obtain some pretty sophisticated effects. -- Larry
