Download MetaTrader 5
To add comments, please log in or register
Hundreds of articles will help you to create a trading robot. Come and read them!
Amir Yacoby
1125
Amir Yacoby 2015.08.04 04:08 

This script prints only up to the third '7' digit on the OBJ_EDIT - thus limiting the length of CEdit and is a bug, or I miss something?

 

//+------------------------------------------------------------------+
//|                                                    testCEdit.mq4 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#include <Controls/Edit.mqh>
CEdit row;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
int OnStart()
  {
//---
//--- calculate coordinates
   int x1=1;
   int y1=30;
   int x2=1100;
   int y2=18;
//--- create
   if(!row.Create(ChartID(),"ed1 Item",0,x1,y1,x2,y2))
      return(-1);
   if(!row.Text(""))
      return(-2);
   if(!row.ReadOnly(true))
      return(-3);
//--- copy text
   if(!row.Text("1111111111222222222233333333334444444444555555555566666666667777777777"))
      return(-1);
   return(0);
  }
//+------------------------------------------------------------------+
alficzech
3
alficzech 2015.09.05 05:34  
IMHO: limit object names and text to a maximum of 63 characters
/
To add comments, please log in or register