Files
2024-05-17 04:54:01 +03:30

34 lines
923 B
Plaintext

void CommentLab(string CommentText)
{
//
string CommentLabel;
int CommentIndex = 0;
//
if (CommentText == "")
{
//
// delete all Comment texts
while (ObjectFind(StringConcatenate("CommentLabel", CommentIndex)) >= 0)
{
//
ObjectDelete(StringConcatenate("CommentLabel", CommentIndex));
CommentIndex++;
}
return;
}
//
while (ObjectFind(StringConcatenate("CommentLabel", CommentIndex)) >= 0)
{
CommentIndex++;
}
//
CommentLabel = StringConcatenate("CommentLabel", CommentIndex);
ObjectCreate(CommentLabel, OBJ_LABEL, 0, 0, 0);
ObjectSet(CommentLabel, OBJPROP_CORNER, 0);
ObjectSet(CommentLabel, OBJPROP_XDISTANCE, 5);
ObjectSet(CommentLabel, OBJPROP_YDISTANCE, 15 + (CommentIndex * 15));
ObjectSetText(CommentLabel, CommentText, 10, "Tahoma", Status_Color);
}