How to increase Font size of Comment()?

To add comments, please log in or register
Forex Trader
114341
Forex Trader  
Is there a way to increase the fonts of Comment()?
Forex Trader
114341
Forex Trader  
No way. Use TextLabel object
Abhay Agarwal
710
Abhay Agarwal  

you can ,use this function:


void CommentLab(string CommentText)  
{
   string CommentLabel, label_name;
   int CommentIndex = 0;
  
   label_name = "Bid_Offer"; 

   if (CommentText == "")
   {
      //  delete all Comment texts
      while(ObjectFind(0,label_name) >= 0)
      {
         ObjectDelete(0,label_name);
         CommentIndex++;
      }
//    return;
   }
  

//    Print("CommentText: ",CommentText);
  
      ObjectCreate(0,label_name,OBJ_LABEL,0,0,0);           
      ObjectSetInteger(0,label_name, OBJPROP_CORNER, 0);
      //--- set X coordinate
      ObjectSetInteger(0,label_name,OBJPROP_XDISTANCE,20);
      //--- set Y coordinate
      ObjectSetInteger(0,label_name,OBJPROP_YDISTANCE,50);
      //--- define text color
      ObjectSetInteger(0,label_name,OBJPROP_COLOR,clrGoldenrod);
      //--- define text for object Label
      ObjectSetString(0,label_name,OBJPROP_TEXT,CommentText);
      //--- define font
      ObjectSetString(0,label_name,OBJPROP_FONT,"Arial");
      //--- define font size
      ObjectSetInteger(0,label_name,OBJPROP_FONTSIZE,18);
      //--- 45 degrees rotation clockwise
//    ObjectSetDouble(0,label_name,OBJPROP_ANGLE,-45);
      //--- disable for mouse selecting
      ObjectSetInteger(0,label_name,OBJPROP_SELECTABLE,true);
      //--- draw it on the chart
      ChartRedraw(0);                                     
  
}

Eleni Anna Branou
Moderator
6562
Eleni Anna Branou  

Please use the </> button to insert your code.


To add comments, please log in or register