Seems a bug in CEdit?

Back to topics list To post a new topic, please log in or register
avatar
53
amir_avatar 2015.08.04 06: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);
  }
//+------------------------------------------------------------------+
avatar
1
alficzech 2015.09.05 07:34 #
 
IMHO: limit object names and text to a maximum of 63 characters
Back to topics list  

To add comments, please log in or register