MQL5 Standard Library Panels And Dialogs. Check Function

Michal Herda  

Hello !


As this is my first post this forum, I would like to extend a warm welcome to Everyone !

Can anyone explain or show, where in documentation is function Check ?

And what this function arguments mean, please.


I have found this in CCheckGroup code example.

It is marked on attached file.


Sorry, if I haven't notice, but it seems it is skipped in documentation.


Regards

Documentation on MQL5: Standard Library / Panels and Dialogs / CCheckGroup
Documentation on MQL5: Standard Library / Panels and Dialogs / CCheckGroup
  • www.mql5.com
CCheckGroup - Panels and Dialogs - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Files:
Michal Herda  

Thank you, but you sent me the link to the page that I made the screenshot of (and I have taken the link in the file above) .


Unfortunately, this method is not available on the list above.



m_check_group.Check(0,1<<0);



I have only found "Checked" method there:


https://www.mql5.com/en/docs/standardlibrary/controls/ccheckbox.&nbsp;

Fernando Carreiro  
Michal Herda: As this is my first post this forum, I would like to extend a warm welcome to Everyone! Can anyone explain or show, where in documentation is function Check? And what this function arguments mean, please. I have found this in CCheckGroup code example. It is marked on attached file. Sorry, if I haven't notice, but it seems it is skipped in documentation.

Yes, you are correct. That method is indeed missing from the documentation. You will have to rely on the source code of the "MQL5\Include\Controls\CheckGroup.mqh" file to see what it does:

int CCheckGroup::Check(const int idx) const
  {
//--- check
   if(idx>=m_values.Total())
      return(0);
//---
   return(m_states[idx]);
  }
bool CCheckGroup::Check(const int idx,const int value)
  {
//--- check
   if(idx>=m_values.Total())
      return(false);
//---
   bool res=(m_states.Update(idx,value) && Redraw());
//--- change value
   if(res && idx<64)
     {
      if(m_rows[idx].Checked())
         Value(m_value|m_values.At(idx));
      else
         Value(m_value&(~m_values.At(idx)));
     }
//---
   return(res);
  }
Amir Yacoby  
It's not in documentation, but you can find it's source in the file you've attached and understand what it does.
Michal Herda  


Thanks !


Here, most of it is so well documented that I forgot to look at the mqh file  :D