Panels and Dialogs CSpinEdit

 

hello everyone, I'm writing a panel and I wanted to ask if you can set and use the CSpinEdit class by writing in the text box and not just clicking on the increase and decrease arrows.

I have not found the way thank you

//+------------------------------------------------------------------+
//| Create the "SpinEdit" element                                    |
//+------------------------------------------------------------------+
bool CControlsDialog::CreateSpinEdit(void)
  {
//--- coordinates
   int x1=INDENT_LEFT;
   int y1=INDENT_TOP+(EDIT_HEIGHT+CONTROLS_GAP_Y)+(BUTTON_HEIGHT+CONTROLS_GAP_Y);
   int x2=x1+GROUP_WIDTH;
   int y2=y1+EDIT_HEIGHT;
//--- create
   if(!m_spin_edit.Create(m_chart_id,m_name+"SpinEdit",m_subwin,x1,y1,x2,y2))
      return(false);
      
   if(!Add(m_spin_edit)) return(false);
   
   m_spin_edit.MinValue(10);
   m_spin_edit.MaxValue(1000);
   m_spin_edit.Value(100);
   

//--- succeed
   return(true);
  }
 

I did a modified class (SpinEditKVN.mqh) in the Double opening panel code


Version 1.100: The SpinEditKVN.mqh control has been modified - now you can enter the lot size in the field. After leaving the field, an automatic check is performed: characters except digits are deleted and if there is a “,” symbol, then it is replaced by “.”

Double opening panel
Double opening panel
  • www.mql5.com
Версия 1.100: Модифицирован элемент управления SpinEditKVN.mqh - теперь в поле можно вводить размер лота. После выхода из поля производится автоматическая проверка: удаляются символы кроме цифр и если есть символ "," - то он заменяется на "." Панель на базе класса CDialog. Во входных параметрах задаются два символа ( Symbol 0 и Symbol 1) и...
Reason: