OnMouseEnter - NinjaTrader Programming | futures io social day trading
futures io futures trading


OnMouseEnter
Updated: Views / Replies:977 / 5
Created: by Mindset Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

OnMouseEnter

  #1 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

OnMouseEnter

I have searched futures.io (formerly BMT), Ninja and MSDN but have been unable to resolve an issue.
Is it possible to put a rectangle or a button on a panel and then have it change colour upon the mouse entering it and leaving it?
sounds simple?

I can get the button to change colour upon clicking it but the OnMouseEnter and OnMouseLeave methods stubbornly refuse to co operate.


Any help much appreciated.

Attached Thumbnails
OnMouseEnter-canary.png   OnMouseEnter-canary-2.png  
Attached Files
Register to download File Type: zip DrawRectangle.zip (2.7 KB, 21 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


with a button it can be easily done. just set a MouseEnter/MouseLeave event.


 
Code
btn.MouseEnter += new EventHandler(mouse_enter);
 
Code
private void mouse_enter(object sender,EventArgs e)
        {
            btn.BackColor = Color.Green;
        }
edit: i just have a peep at your code. you got to add the button FormButton to the chartpanel. you havent done that.

 
Code
panel.Controls.Add(FormButton);
and do remember to remove it on termination.


Last edited by bukkan; August 17th, 2010 at 12:08 PM.
Reply With Quote
The following 2 users say Thank You to bukkan for this post:
 
  #4 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Just one more thing

Bukkan

Many thanks - I had the FormButton Control posted in chartcontrol - hence all my issues.
One final thing the button sits 'on top' of the chart and I would like to make it invisible - sort of like a hotspot on a web page.
I tried FormButton.Visible = false;
but that means OnMouseEnter no longer works - I guess the control is no longer visible to the mouse?
any ideas?

Reply With Quote
 
  #5 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


Mindset View Post
Bukkan

Many thanks - I had the FormButton Control posted in chartcontrol - hence all my issues.
One final thing the button sits 'on top' of the chart and I would like to make it invisible - sort of like a hotspot on a web page.
I tried FormButton.Visible = false;
but that means OnMouseEnter no longer works - I guess the control is no longer visible to the mouse?
any ideas?

i dont know whether its a elegant approach or not but you can try this.


OnStartUp
 
Code
ChartControl.ChartPanel.MouseMove += new MouseEventHandler(panel_enter);
panel enter

 
Code
private void panel_enter(object sender,MouseEventArgs e)
{
       //assuming the button is placed at point X=100,Y=100, change 100 with your own location start points
       if (e.X >= 100 && e.X < 100 + btn.Width && e.Y >= 100 && e.Y <= 100 + btn.Height)
       {
              btn.Visible = true;
       }
        else {btn.Visible = false;}
}
OnTermination
 
Code
ChartControl.ChartPanel.MouseMove -= new MouseEventHandler(panel_enter);
p.s. - btn = Button

Reply With Quote
The following user says Thank You to bukkan for this post:
 
  #6 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

5 stars Bukkan

Excellent work!
I have now completed my trade aid.
I will post it in the download section at some point tomorrow.

Reply With Quote
The following user says Thank You to Mindset for this post:

Reply



futures io > > > > > OnMouseEnter

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     


All times are GMT -4. The time now is 09:50 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.09 seconds with 19 queries on phoenix via your IP 54.221.93.187