Resizing a dialog

 

Hi,

Anybody knows why the examples of indicator or expert given for instance in <Indicators/Examples/SimplePanel> show a panel but can not resize it?

 

Thanks 

 
Probably because the examples are there for proof of concept, and do not have a lot of functionality they might be capable of if more work was put into them.  More capabilities means more coding, and they are probably trying to make the most productive use of their time by covering more topics than going into larger detail level with one thing.
 

 You're probably wrong because the code has the OnResize method:

//+------------------------------------------------------------------+
//| Handler of resizing                                              |
//+------------------------------------------------------------------+
bool CPlanPanelDialog::OnResize(void)
  {
//--- call method of parent class
   if(!CAppDialog::OnResize()) return(false);
//--- coordinates
   int x=ClientAreaLeft()+INDENT_LEFT;
   int y=m_radio_group.Top();
   int sx=(ClientAreaWidth()-(INDENT_LEFT+INDENT_RIGHT+BUTTON_WIDTH))/3-CONTROLS_GAP_X;
//--- move and resize the "RadioGroup" element
   m_radio_group.Move(x,y);
   m_radio_group.Width(sx);
//--- move and resize the "CheckGroup" element
   x=ClientAreaLeft()+INDENT_LEFT+sx+CONTROLS_GAP_X;
   m_check_group.Move(x,y);
   m_check_group.Width(sx);
//--- move and resize the "ListView" element
   x=ClientAreaLeft()+ClientAreaWidth()-(sx+INDENT_RIGHT+BUTTON_WIDTH+CONTROLS_GAP_X);
   m_list_view.Move(x,y);
   m_list_view.Width(sx);
//--- succeed
   return(true);
  }

 

 The problem is that this method does not get executed when you try to change the panel size with the mouse. 
Is it supposed to get executed when the mouse change the panel size as with any other windows system window?

 It doesnt seem that mt4 creates an event when you change the panel size, or I miss something.  

 
I was working on reading and responding to (some) posts at the time, and didn't take a look at the code for the example you said.  I do not have experience with MQL4, so I cannot say for sure, but I do know in Java, they have what are called event handlers for different things, such as window resizing, mouse events, and so on.  It has been so long since my Java class, so I do not remember exactly how to code it, but there is an event handler named OnMouseEvent or MouseEvent or something like that.  How that works is the listener is a part of the code within the program, similar in concept to the OnResize method you are talking about, and is supposed to get called automatically when the event (or events) that part of code is supposed to be listening for and when it sees the event happen, it is supposed to automatically (like you are saying) execute the required code.  How to fix that within MQL, IDK, sorry to say.  Working on trying to learn MQL right now, and hoping my Java knowledge will help me out, as both languages are based on C++.
Reason: