Dragging Rectangle label like a window interface. What class to use ?

 

Hello,


Can anyone please tell me how to create a Label Rectangle that acts like a window ? Meaning that it can be dragged when it is touched (preferably in the top part of it like in a normal window)


The normal Rectangle label or Rectangle don't have the ability to be dragged, but for the rectangle label one can drag it if it is selected and also touched from the center. 


This is surely something that needs classes. I'd appreciate it if someone can help me with this ?


Thank you. 

 
TomQL: The normal Rectangle label or Rectangle don't have the ability to be dragged, but for the rectangle label one can drag it if it is selected
  1. Contradictory statement.
  2. Exactly what I use in my GUI: Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 5
 
whroeder1:
  1. Contradictory statement.
  2. Exactly what I use in my GUI: Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 5

It's not contradictory statement if you really understood what I mean. The Rectangle has the ability to be dragged but in a specific way; "Selected + Dragged from center". I'm looking for a different kind of Dragging (Like window Dragging) from the top and not center of the object. The Rectangle Label object can't be dragged or even selected as far as I know.

Apparently, you seem like you're promoting your EA that doesn't work. I told you in my previous thread that I saw nothing when I attached your EA! So why on earth would you give me the same link to your EA again ?

 
TomQL:

It's not contradictory statement if you really understood what I mean. The Rectangle has the ability to be dragged but in a specific way; "Selected + Dragged from center". I'm looking for a different kind of Dragging (Like window Dragging) from the top and not center of the object. The Rectangle Label object can't be dragged or even selected as far as I know.

Yes your initial statement is contradictory but that doesn't really matter.

Rectangle label can only be created by code (I suppose you are using MT4 ?). After it's done they can be dragged in similar way as Rectangle. If you want to drag them without being selected firstly you have to code it, using OnChartEvent().

Apparently, you seem like you're promoting your EA that doesn't work. I told you in my previous thread that I saw nothing when I attached your EA! So why on earth would you give me the same link to your EA again ?

"Please be polite when communicating on this website. Refrain from statements that may offend or insult other users."

 
TomQL:

It's not contradictory statement if you really understood what I mean.

Apparently, you seem like you're promoting your EA that doesn't work. I told you in my previous thread that I saw nothing when I attached your EA!

I told you in my previous thread that I saw nothing when I attached your EA! So why on earth would you give me the same link to your EA again ?

  1. First you say it "don't have the ability to be dragged" and in the same sentence you say "rectangle label one can drag it if it is selected." We shouldn't have to read between the line to understand what you really meant; you are the one asking for help.
  2. EA works just fine. Attach it. Verify you have a simile face. Move the cursor over the chart to your buy price and press the B key. Did you bother to read the OPs instructions?


  3. You're not the only person posting here. Do you really expect me to remember you? You edited your "thank you" and mentioned that you couldn't get it to work. Did you ever think I didn't see your post post-edit? Did you PM and ask? Live in ignorance.
 
Alain Verleyen:

Yes your initial statement is contradictory but that doesn't really matter.

Rectangle label can only be created by code (I suppose you are using MT4 ?). After it's done they can be dragged in similar way as Rectangle. If you want to drag them without being selected firstly you have to code it, using OnChartEvent().

"Please be polite when communicating on this website. Refrain from statements that may offend or insult other users."


Thanks. I needed the "OnChartEvent()" method! I forgot about it. Yes I do use MT4.

About the "contradiction", You are right it doesn't matter..It also didn't matter to mention it either. Because surely anyone who knows MQL4 knew what I meant didn't have to point it out.

Did the use of "Why on earth would you.." considered an offence ? I didn't mean to offend or insult. I was just surprised to see the same reply giving by the same person even though I told him few days ago that it didn't work.

 
whroeder1:
  1. First you say it "don't have the ability to be dragged" and in the same sentence you say "rectangle label one can drag it if it is selected." We shouldn't have to read between the line to understand what you really meant; you are the one asking for help.
  2. EA works just fine. Attach it. Verify you have a simile face. Move the cursor over the chart to your buy price and press the B key. Did you bother to read the OPs instructions?


  3. You're not the only person posting here. Do you really expect me to remember you? You edited your "thank you" and mentioned that you couldn't get it to work. Did you ever think I didn't see your post post-edit? Did you PM and ask? Live in ignorance.

Dragging Rectangle label like a "window interface" That was the title of my thread. You saw a "Contradiction" but what I meant was that the Rectangle label didn't have the ability to be dragged like a "Window" ! There is no point in mentioning the contradiction and no point in talking about this.

I owe you an apology for "offending" you! Although I'm not sure how. But Your EA is Great !


I didn't read the OPs instructions because I didn't see any !! However I read your post and I know now that I should've pressed B for the Rectangle to appear. I only saw the sad face when I attached the EA.


Thank you very much for the EA. It will be very useful.


I didn't Edit anything William. And I hope that the member who said to read the rules about offence see the offence in your word : "Live in ignorance". I am actually offended by that because I hate ignorance. I'm not sure why you think I edited the post but I barely know how to use the forum and surely didn't edit anything at all. Did you really think I edited the post ? For what purpose exactly ? Don't Live in ignorance. (Hope you're not offended by that)

 
TomQL:

Dragging Rectangle label like a "window interface" That was the title of my thread. You saw a "Contradiction" but what I meant was that the Rectangle label didn't have the ability to be dragged like a "Window" ! There is no point in mentioning the contradiction and no point in talking about this.

I owe you an apology for "offending" you! Although I'm not sure how. But Your EA is Great !


I didn't read the OPs instructions because I didn't see any !! However I read your post and I know now that I should've pressed B for the Rectangle to appear. I only saw the sad face when I attached the EA.


Thank you very much for the EA. It will be very useful.


I didn't Edit anything William. And I hope that the member who said to read the rules about offence see the offence in your word : "Live in ignorance". I am actually offended by that because I hate ignorance. I'm not sure why you think I edited the post but I barely know how to use the forum and surely didn't edit anything at all. Did you really think I edited the post ? For what purpose exactly ? Don't Live in ignorance. (Hope you're not offended by that)

The rule says "that may...", your intention can be different but what you wrote may be offending. Also you are right about "Live in ignorance" but unfortunately it's what happening when someone may be offended. I propose to stop arguing about that point, it's now clearer.

 
Alain Verleyen:

The rule says "that may...", your intention can be different but what you wrote may be offending. Also you are right about "Live in ignorance" but unfortunately it's what happening when someone may be offended. I propose to stop arguing about that point, it's now clearer.

You are right Alain.


I am sorry if I offended William. It was my mistake for not knowing how to make the EA work but it turns out the EA is great and very helpful. 

 
TomQL:

You are right Alain.


I am sorry if I offended William. It was my mistake for not knowing how to make the EA work but it turns out the EA is great and very helpful. 


What's up Tom. I believe the class you're looking for is CCanvas. Here is an example of it in use. https://www.mql5.com/en/code/13688

CComment Class
CComment Class
  • votes: 29
  • 2015.10.12
  • Andrey Voytenko
  • www.mql5.com
Class for displaying multi-line comments.
 
nicholishen:

What's up Tom. I believe the class you're looking for is CCanvas. Here is an example of it in use. https://www.mql5.com/en/code/13688


Thank You very much nichlishen! You are totally right. That was exactly what I was looking for.


Thank You

Reason: