Discussion of article "Graphical Interfaces III: Simple and Multi-Functional Buttons (Chapter 1)" - page 3

 
Good afternoon, I hope you can help me.

I want to make a two-state button move after clicking on it. The method is written, but it doesn't work.

I can see from the logs that the function is called, but the position of the button does not change

void CVisButBoard::ChangeButtonPosition(CButtHedge &_button, const int _ShiftX, const int _ShiftY)
  {
      _button.Moving(_ShiftX,_ShiftY);
  
  }


class CSimpleButton : public CElement
  

void CSimpleButton::Moving(const int x,const int y)
  {
//--- Exit if the item is hidden
   if(!CElement::IsVisible())
      return;
      
  Print("Budem Dvigat? X?",x);    
//--- Saving coordinates in element fields
   CElement::X(x+XGap());
   CElement::Y(y+YGap());
//--- Saving coordinates in object fields
   m_button.X(x+m_button.XGap());
   m_button.Y(y+m_button.YGap());
//--- Updating coordinates of graphical objects
   m_button.X_Distance(m_button.X());
   m_button.Y_Distance(m_button.Y());
  }
//+---
 

Good afternoon!

Many thanks to the author for the articles, a lot of informative and interesting. But I haven't read all of them yet, and I have a question - is it possible to make the buttons not "transparent", i.e. you can't scroll through it to see the chart with the price. It turns out that if the cursor shifts a bit when pressing the button, the button is not pressed because the price chart is captured. Thanks in advance for any help.

 
Ruslan Piraliyev #:

Good afternoon!

Many thanks to the author for the articles, a lot of informative and interesting. But I haven't read all of them yet, and I have a question - is it possible to make the buttons not "transparent", i.e. you can't scroll through it to see the chart with the price. It turns out that if the cursor shifts a bit when pressing the button, the button is not pressed because the price chart is captured. Thanks in advance for any help.

If you just want to use the library for your projects, you don't have to read all the articles.

It is better to get the latest version of the library from here: https: //www.mql5.com/ru/code/19703.

And see examples with graphical interfaces from the latest articles:

EasyAndFastGUI - библиотека для создания графических интерфейсов
EasyAndFastGUI - библиотека для создания графических интерфейсов
  • www.mql5.com
Библиотека EasyAndFastGUI дает возможность создавать графические интерфейсы для своих MQL-программ.
 
Anatoli Kazharski #:

If you just want to use the library for your projects, you don't necessarily need to read all the articles.

It is better to get the latest version of the library from here: https: //www.mql5.com/ru/code/19703

And see examples with graphical interfaces from the latest articles:

Thanks for the links, I will check them out if possible. What about my question about the "transparency" of graphical objects through which the price chart scrolls? Is it possible to make graphical objects not "transparent"? You just have a decent experience in this matter, maybe you have encountered it.

 
Ruslan Piraliyev #:

Thanks for the links, I will check it out if possible. What about my question about "transparency" of graphical objects through which the price chart scrolls? Is it possible to make graphical objects not "transparent"? You just have a decent experience in this matter, maybe you have encountered it.

I don't understand the question. I believe that there is no such problem in the latest versions. Try it.

 
Anatoli Kazharski #:

I don't understand the question. I believe that in the latest versions there is no such problem. Try this.

For example, there is a Buy button, if you just press it and release it, it will work as it should, but if you point at it and press it, the whole chart will be captured (it's in the background) and it will scroll when you move the mouse left-right. That is, if there is the slightest displacement when pressing this button (and it happens), the button will not work because the chart with the price is captured. So I would like to make such a button not "transparent" so that the chart with the chart does not cling through it. For example, the built-in MT5 buttons "trade in one click" work as they should.

 
Ruslan Piraliyev #:

For example, there is a Buy button, if you just press it and release it, it will work as it should, but if you point at it and press it, the whole chart will be captured (it is on the background) and it will scroll when you move the mouse left-right. That is, if there is the slightest displacement when pressing this button (and it happens), the button will not work because the chart with the price is captured. So I would like to make such a button not "transparent" so that the chart with the chart does not cling through it. For example, the built-in MT5 buttons "trade in one click" work as they should.

In the latest version it works as you need:

EasyAndFastGUI - library for creating graphical interfaces
EasyAndFastGUI - библиотека для создания графических интерфейсов
EasyAndFastGUI - библиотека для создания графических интерфейсов
  • www.mql5.com
Библиотека EasyAndFastGUI дает возможность создавать графические интерфейсы для своих MQL-программ.
 
Anatoli Kazharski #:

The latest version works as you need it to:

EasyAndFastGUI - library for creating graphical interfaces

Thanks, I'll give it a try!

 
Anatoli Kazharski #:

The latest version works as you need it to:

EasyAndFastGUI - library for creating graphical interfaces

Of course, you have done a tremendous job on the development and on the description, here is above all praise. It is difficult to understand everything at once , but from what I tried it turns out that you have a button is created on the toolbar and the panel with the button is really not shining through what you need. Perhaps in the future I will also come to such an implementation, but now I have a task to create a purely button without a form-underlay and that it did not shine through. If you point to a property or tell me how to do it I will be very glad.

 
Ruslan Piraliyev #:

...

Perhaps in the future I will also come to such an implementation, but I have now the task to create a pure button without the form-underlay and that it is not translucent.

...

That's exactly what I don't have.