0

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" );
   }

}
3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by cikara21
0

Try this->radiobutton4->Checked although it should work without.
I have the effect you want if I Hover VERY slowly over the control.

0

try

//----------------------------------------------------------------------------
//...
private: System::Int32 m_x, m_y;
//...
//----------------------------------------------------------------------------
ON FORM1 MOUSE MOVE
{
    m_x = e->X;
    m_y = e->Y;
}
//----------------------------------------------------------------------------
ON TEXTBOX1 MOUSE LEAVE
{
    toolTip1->Hide(this);
}
//----------------------------------------------------------------------------
private: System::Void textBox2_MouseHover(System::Object^  sender, System::EventArgs^  e) 
{
    if( radioButton4->Checked )
    {
         toolTip1->Show("Hello",this,m_x,m_y);
    }
}
//----------------------------------------------------------------------------
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.