toolTip1 for textBox

Reply

Join Date: Mar 2008
Posts: 163
Reputation: Lukezzz is an unknown quantity at this point 
Solved Threads: 1
Lukezzz Lukezzz is offline Offline
Junior Poster

toolTip1 for textBox

 
0
  #1
Dec 30th, 2008
I want to Show "ToolTips" when radioButton4 is Checked and when you Hover the mouse over textBox2.

This works as expected. Now when I Check the radioButton5 wich makes the radioButton4 UnChecked I dont want the ToolTips to be seen when Hover the mouse over textBox2.

I am trying to make that rule with the code below but the ToolTips is shown anyway. Have I missed something out because I do make the check:
if( radioButton4->Checked ) etc.. ?

private: System::Void textBox2_MouseHover(System::Object^  sender, System::EventArgs^  e) 
{

    if( radioButton4->Checked ) //Also tried: radioButton4->Checked == true
   {
       toolTip1->SetToolTip( this->textBox2, "Hello" );
   }

}
Last edited by Lukezzz; Dec 30th, 2008 at 12:59 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,841
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 266
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: toolTip1 for textBox

 
0
  #2
Dec 30th, 2008
Try this->radiobutton4->Checked although it should work without.
I have the effect you want if I Hover VERY slowly over the control.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz

Re: toolTip1 for textBox

 
0
  #3
Dec 30th, 2008
try
  1. //----------------------------------------------------------------------------
  2. //...
  3. private: System::Int32 m_x, m_y;
  4. //...
  5. //----------------------------------------------------------------------------
  6. ON FORM1 MOUSE MOVE
  7. {
  8. m_x = e->X;
  9. m_y = e->Y;
  10. }
  11. //----------------------------------------------------------------------------
  12. ON TEXTBOX1 MOUSE LEAVE
  13. {
  14. toolTip1->Hide(this);
  15. }
  16. //----------------------------------------------------------------------------
  17. private: System::Void textBox2_MouseHover(System::Object^ sender, System::EventArgs^ e)
  18. {
  19. if( radioButton4->Checked )
  20. {
  21. toolTip1->Show("Hello",this,m_x,m_y);
  22. }
  23. }
  24. //----------------------------------------------------------------------------
Last edited by cikara21; Dec 30th, 2008 at 6:00 pm.
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC