Control.Anchor [= nValue] |
Position | Bit value | Bit number | Conflicting values | Description |
---|---|---|---|---|
Top Left |
0 |
|
|
Anchors control to the top and left borders of the container and does not change the distance between the top and left borders. (Default) |
Top Absolute |
1 |
0 |
16, 512 |
Anchors control to top border of container and does not change the distance between the top border. |
Left Absolute |
2 |
1 |
32, 256 |
Anchors control to left border of container and does not change the distance between the left border. |
Bottom Absolute |
4 |
2 |
64, 512 |
Anchors control to bottom border of container and does not change the distance between the bottom border. |
Right Absolute |
8 |
3 |
128, 256 |
Anchors control to right border of container and does not change the distance between the right border. |
Top Relative |
16 |
4 |
1, 512 |
Anchors control to top border of container and maintains relative distance between the top border. |
Left Relative |
32 |
5 |
2, 256 |
Anchors control to left border of container and maintains relative distance between the left border. |
Bottom Relative |
64 |
6 |
4, 512 |
Anchors control to bottom border of container and maintains relative distance between the bottom border. |
Right Relative |
128 |
7 |
8, 256 |
Anchors control to right border of container and maintains relative distance between the right border. |
Horizontal Fixed Size |
256 |
8 |
2, 8, 32, 128 |
Anchors center of control relative to left and right borders but remains fixed in size. |
Vertical Fixed Size |
512 |
9 |
1, 4, 16, 64 |
Anchors center of control relative to top and bottom borders but remains fixed in size. |
Control | nValue | Description |
---|---|---|
TextBox or EditBox |
10 |
Resizes control horizontally as you resize it. |
CommandButton |
12 |
Displays a set of two controls, for example, OK and Cancel, in the lower right corner. |
CommandButton |
128 and 32 |
Centers two left and right command buttons. |
CommandButton |
260 |
Centers control on the bottom of a form. jm |
PROCEDURE get_Grid_width
*-----------------------
LPARAMETERS toGrid
* toGrid: referencia al objeto Grid
* lnWidth = get_Grid_Width(thisform.grid1)
LOCAL lnWidth,i
lnWidth = IIF(toGRid.recordmark,10,1) ;
+ IIF(toGrid.deleteMark,6,0) ;
+ IIF(toGrid.scrollbars > 0,SYSMETRIC(5),4) ;
+ toGrid.Columncount -1 ;
+ 4
FOR i = 1 TO toGrid.ColumnCount
lnWidth = m.lnWidth ;
+ toGrid.Columns(m.i).Width
NEXT
RETURN m.lnWidth
ENDPROC