Classes for creating panels and dialogues - page 2

 
Dmitry Fedoseev:

Wrong. The indicator itself draws in the sub-window, but the panel needs to be created on the price chart. There is no reaction to subwin parameter. Judging by the code in Dialog.mqh, it should not:

bool CAppDialog::CreateIndicator(const int x1,const int y1,const int x2,const int y2)
  {
   int width=m_chart.WidthInPixels();
//--- geometry for the minimized state
   m_min_rect.LeftTop(0,0);
   m_min_rect.Width(width);
   m_min_rect.Height(CONTROLS_DIALOG_MINIMIZE_HEIGHT-2*CONTROLS_BORDER_WIDTH);
//--- determine subwindow
   m_subwin=ChartWindowFind();

I've already found a way out, very tricky (and very unusual, will be in the article). But still the way of thinking of the creator of these classes is very interesting.

To create a SimplePanel indicator on the main chart window instead of a subwindow, it is sufficient to write #property indicator_separate_window instead of #property indicator_chart_window

 
Dmitry Fedoseev:

All right, fine, I'll ask around. But in a couple of days. I need some rest, I'm overheated. And I'd like an answer from Roche on the GUI requirements.

Although, if you don't mind, show me a template with a window, like on the picture above, with:

  • two input fields
  • two input fields with spins
  • two drop down lists
  • button

Naturally the events need to be handled, and a code example on how to resize the window would be nice too.

The main point of my task is to change the set of controls on the form on the fly.

The first two input fields should be for text input? Unfortunately it will only be in the next version and I can't say yet when it will be published. The material is almost ready, but I haven't started writing the article yet.

 
Slawa:

To create a SimplePanel indicator on the main chart window instead of a subwindow, simply write #property indicator_separate_window instead of #property indicator_chart_window

If at the same time there will be some indicator in the subwindow, the panel will glitch. I already wrote about it here.
 
Anatoli Kazharski:

The first two input fields should be for entering text? Unfortunately it will only be in the next version, and I can't say yet when it will be published. The material is almost ready, but I haven't started writing the article yet.

How so? The input box is the beginning of the beginning. We have the spin box, but not the entry field.

Generally you should drive int parameters and several variants of standard enumerations: type of average, price (for this the drop-down list). But only if the library doesn't provide the elementary, I don't know. I don't know if it is worth it. I don't know if it is worth it, so that someone else would bang their head against the wall.

 
Dmitry Fedoseev:

How is that possible? The input box is the beginning of the beginning. SpinBox is there, input field is not.

Generally you should drive int parameters and several variants of standard enumerations: type of average, price (for this the drop-down list). But only if the library doesn't provide the elementary, I don't know. I don't know if it is worth it. So that someone else would bang their head against the wall afterwards.

That's how it turned out. I haven't needed it anywhere in my development yet, and just recently received a request from several users for a text input field.

The library is developing. Gradually everything you need will be there. )

 
Dmitry Fedoseev:

...

Generally, int parameters and some options for standard enumeration: type of average, price (for this drop-down list).

And in the text field, what parameters should be entered?
 
Anatoli Kazharski:
And in the text box, what parameters should be entered?
Numbers int
 
Dmitry Fedoseev:
Numbers int

Right?

//---

P.S .The input fields for numbers are already there now. This is CSpinEdit class. Text input fields, CTextEdit class, will be available in the next update(build 5).

 
Anatoli Kazharski:

Right?

//---

P.S .The input fields for numbers are already there now. This is CSpinEdit class. Input fields for text, CTextEdit class, will be in next update(build 5).

So
 
Dmitry Fedoseev:
If there is any indicator in subwindow, the panel will glitch. Already wrote about it here.

Nothing is glitchy. What are the symptoms?

I've just tried it. First the indicator in the subwindow. Then the panel on the chart. Then a similar panel in the subwindow. The only thing I saw was SimplePanel2 in the first subwindow. But it does not affect the operation. All the buttons pressed correctly.

The only thing that differs SimplePanel2 from SimplePanel is the indicator_chart_window property.

PS are we talking about five or four?

Reason: