CEdit limited length

 

Hello,

it seems CEdit has a limited length, it seems 64 chars.

The class seems not to have members to extend this.

Is this intended or a bug ?

Thank you

 
chinaski :

Hello,

it seems CEdit has a limited length, it seems 64 chars.

The class seems not to have members to extend this.

Is this intended or a bug ?

Thank you

Take a look at the CEdit class and see what graphical element this class is based on. After that, you will find out where the limit on the number of characters comes from.

 
Vladimir Karputov:

Take a look at the CEdit class and see what graphical element this class is based on. After that, you will find out where the limit on the number of characters comes from.

ObjectSetString ?

Where do i find the limitation number ? Can you help me out ? Thank you.

 
chinaski :

ObjectSetString ?

Where do i find the limitation number ? Can you help me out ? Thank you.

No, ObjectSetString is not a graphics object. Look further ...

 
Vladimir Karputov:

No, ObjectSetString is not a graphics object. Look further ...

Hello Vladimir,

it seems it all ends up in  ObjectSetString. Please look closer.


//+------------------------------------------------------------------+
//| Set comment of object                                            |
//+------------------------------------------------------------------+
bool CChartObject::Description(const string new_text) const
  {
//--- check
   if(m_chart_id==-1)
      return(false);
//--- tune
   if(new_text=="")
      return(ObjectSetString(m_chart_id,m_name,OBJPROP_TEXT," "));
//--- result
   return(ObjectSetString(m_chart_id,m_name,OBJPROP_TEXT,new_text));
  }


But this is not important here. Important is: Why is the text limited at all ?  

 
chinaski:


Forum on trading, automated trading systems and testing trading strategies

CEdit limited length

Vladimir Karputov, 2021.02.27 05:57

Take a look at the CEdit class and see what graphical element this class is based on. After that, you will find out where the limit on the number of characters comes from.


 
Vladimir Karputov:

This is what i see when i follow code (MT5)

CEdit::Text ->  CChartObjectEdit::Description() -> CChartObjectLabel -> CChartObjectText -> CChartObject::Description -> ObjectSetString


If you know the place where i can see / change limit, it would be great. Thank you.

 
чинаски :

Это то, что я вижу, когда следую коду (MT5)


Если вы знаете место, где я могу увидеть / изменить лимит, было бы здорово. Спасибо.

You cannot change the limit. Unfortunately, you haven't figured out what element the object is built on.

 
Vladimir Karputov:

You cannot change the limit. Unfortunately, you haven't figured out what element the object is built on.

I did and you are no help. Thank you

Reason: