Graphical objects Text, Label, Bitmap and Bitmap Label (OBJ_TEXT, OBJ_LABEL, OBJ_BITMAP and OBJ_BITMAP_LABEL) can have one of the 9 different ways of coordinate binding defined by the OBJPROP_ANCHOR property.
Object |
ID |
X/Y |
Width/Height |
Date/Price |
|||
|---|---|---|---|---|---|---|---|
Text |
— |
— |
Yes |
— |
Yes |
Yes |
|
Label |
Yes |
Yes (read only) |
— |
Yes |
Yes |
Yes |
|
Button |
Yes |
Yes |
— |
Yes |
— |
— |
|
Bitmap |
— |
Yes (read only) |
Yes |
— |
Yes |
— |
|
Bitmap Label |
Yes |
Yes (read only) |
— |
Yes |
Yes |
— |
|
Edit |
Yes |
Yes |
— |
Yes |
— |
— |
|
Rectangle Label |
Yes |
Yes |
— |
Yes |
— |
— |
The following designations are used in the table:
La variante necessaria può essere specificata usando la funzione ObjectSetInteger(Chart_handle, object_name, OBJPROP_ANCHOR, Anchor_point_mode), dove anchor_point_mode è uno dei valori di ENUM_ANCHOR_POINT.
ID |
Descrizione |
|---|---|
ANCHOR_LEFT_UPPER |
Punto di ancoraggio in alto a sinistra |
ANCHOR_LEFT |
Punto di ancoraggio a sinistra nel centro |
ANCHOR_LEFT_LOWER |
Punto di ancoraggio nell'angolo in basso a sinistra |
ANCHOR_LOWER |
Punto di ancoraggio sotto nel centro |
ANCHOR_RIGHT_LOWER |
Punto di ancoraggio nell'angolo in basso a destra |
ANCHOR_RIGHT |
Punto di ancoraggio a destra al centro |
ANCHOR_RIGHT_UPPER |
Punto di ancoraggio in alto a destra |
ANCHOR_UPPER |
Punto di ancoraggio sopra nel centro |
ANCHOR_CENTER |
Punto di ancoraggio strettamente nel centro dell'oggetto |
The OBJ_BUTTON, OBJ_RECTANGLE_LABEL, OBJ_EDIT and OBJ_CHART objects have a fixed anchor point in the upper left corner (ANCHOR_LEFT_UPPER).
Esempio:
string text_name="my_OBJ_TEXT_object";
|
Gli oggetti grafici Freccia (OBJ_ARROW) hanno solo 2 modi di collegamento delle loro coordinate. Gli identificatori sono elencati in ENUM_ARROW_ANCHOR.
ID |
Descrizione |
|---|---|
ANCHOR_TOP |
Ancoraggio sul lato superiore |
ANCHOR_BOTTOM |
Ancoraggio sul lato inferiore |
Esempio:
voidOnStart()
|
Dopo l'esecuzione dello script il grafico sarà come in questa figura.
