Discussion of article "Create Your Own Graphical Panels in MQL5" - page 2

 

I wanted to study everything, so to speak, by the method of poke on the example of Controls.mq5. Already tried to change the name of buttons.

   if(!m_button2.Create(m_chart_id,m_name+"Button2222",m_subwin,x1,y1,x2,y2))
      return(false);
   if(!m_button2.Text("Buy"))
      return(false);

I tried to change the output in m_Edit, changed #define BUTTON_WIDTH . I reloaded the terminal, updated scripts in the navigator.

void CControlsDialog::OnClickButton3(void)
  {
   if(m_button3.Pressed())
      m_edit.Text(__FUNCTION__+"Test");
   else
      m_edit.Text(__FUNCTION__+"I td");

But nothing helps. With different changes, the view of the EA does not change at all. Please tell me what the problem is

 
suggestion for the future... make a class (object) "dropdown calendar"
 
thejobber:
suggestion for the future... make a class (object) "drop-down calendar".

There is already such an object - CDatePicker, see in the standard library

 
Kos:

There is already such a CDatePicker, see in the standard library.

Thank you, there is! I was following the help..... until now, now I will also look in MQL5\Include\Controls, but I will have to learn how to use it (without the description in the help) correctly (( but I have already learnt some classes, I hope it will be easier from now on...).
 
thejobber:
Thank you, yes, it is! I used the help to orientate myself..... until now, now I will also look in MQL5/Include/controls, but I will have to learn how to use it (without the description in the help) correctly (( but I have already mastered some classes, I hope it will be easier from now on...).
Take a look at the Expert Advisor example: ..\Experts\Examples\Controls\Controls\Controls.mq5
 

#property indicator_separate_window

Is there any way to make the panel highlighted not from the bottom, but from the left or right or from the top?

is there any way to prohibit dragging the panel? because everything is done, it works exactly as intended, but when I drag the panel, the elements inside it move outside the panel, somehow there is no desire to deal with this problem, it is easier to prohibit dragging the panel )))

and in general, this biblioteka (panels), is still raw, sometimes everything works as it should, then without changing anything, after some time, begin some strange glitches ... I understand that to solve these problems you need specifics with examples and code... I won't post it for now, because I have solved the main task I set for myself, then if I think of posting it in the market, I will post specifics....

 

thejobber:

...BUT when I drag a panel, the elements inside it move out of the panel, somehow I don't want to deal with this problem, it's easier to forbid dragging the panel ))

Like in the Soviet system - it is easier to forbid :-))

You can look here:

CDialog::Add ()

и

AppDialog:: Run()

 

watched of course, read.... I did everything as it says )

only there is no parameter that controls the ability to drag and drop panels.

 

thejobber:

only there is no parameter that controls the ability to drag and drop panels.

What is the purpose of dragging control?

How so - there is no such parameter? And handlers DialogDragStart(), OnDialogDragProcess(), OnDialogDragEnd()?

 
And how do I add changing font sizes for panel objects to this (for example) panel?