- void OnStart()
- {
- string label_name="my_OBJ_LABEL_object";
- if(ObjectFind(0,label_name)<0)
- {
- Print("Object ",label_name," not found. Error code = ",GetLastError());
- ObjectCreate(0,label_name,OBJ_LABEL,0,0,0);
- ObjectSetInteger(0,label_name,OBJPROP_XDISTANCE,200);
- ObjectSetInteger(0,label_name,OBJPROP_YDISTANCE,300);
- ObjectSetInteger(0,label_name,OBJPROP_COLOR,clrWhite);
- ObjectSetString(0,label_name,OBJPROP_TEXT,UP);
- ObjectSetString(0,label_name,OBJPROP_FONT,"Wingdings");
- ObjectSetInteger(0,label_name,OBJPROP_FONTSIZE,10);
- ObjectSetDouble(0,label_name,OBJPROP_ANGLE,-45);
- ObjectSetInteger(0,label_name,OBJPROP_SELECTABLE,false);
- ChartRedraw(0);
- }
- }
复制代码
|