DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   tooltip on mouse click (http://www.daniweb.com/forums/thread201542.html)

travis67 Jul 3rd, 2009 4:41 pm
tooltip on mouse click
 
Hi again. I need to make tooltip work on mouse click, so when I click on the button for an example, a popup info should appear.

codeManJones Jul 3rd, 2009 4:57 pm
Re: tooltip on mouse click
 
hi travis,

first drag the tooltip onto your form, then put the line below in your button click event. you can set some options in the tooltip.Show() method

        private void button1_Click_1(object sender, EventArgs e)
        {
            toolTip1.Show("Tip Text Here", button1);    //shows the tip on the button
            toolTip1.Show("Tip Text Here", button1, 0, -50, 2500);    //shows 50 pixels above the button for 2.5 seconds
        }

travis67 Jul 3rd, 2009 5:07 pm
Re: tooltip on mouse click
 
Thanks. It works.


All times are GMT -4. The time now is 11:26 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC