Is it possible to prevent two buttons from stacking in the same position in MQL5?
Is it possible to prevent two buttons from stacking in the same position in MQL5?
Loading saved threads...
james · External communityPost link
External question — Stack Overflow Stack Exchange
Author: james
Original post: https://stackoverflow.com/questions/78952049
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am a trading developer.
I am developing a GUI with mql5 and there are two tags on top. When I click on a tag, it hides the current section and shows another section. But there are two buttons (show, hide) in the same position. Here, when you click the show button, you can see that another hidden button is activated.
This seems to be because this hidden button has a higher priority than the other show button.
I need to fix this issue. Please help!
When you click any button, the button marked as expected will work without priority.
Quote
Report
Salar Hamidi · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Salar Hamidi
Original post: https://stackoverflow.com/a/79528001
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I had the same problem and I couldn't find the solution, so I tried another way to solve this problem:
When you change the tab, delete all previous tab buttons (create them again when you click on your tab)
Put a condition inside all of your OnClick functions that if this button is not visible, do nothing.
Rewrite your ON_EVENT:
#define ON_EVENT(event,control,handler) if(id==(event+CHARTEVENT_CUSTOM) && sparam==control.Name()) {handler(); return(true);}
Quote
Report
Post Reply
Checking account access…