-
March 15th, 2012, 11:13 AM
#1
if statement with mousehover event
Code:
private void solutionPanel_MouseHover(object sender, EventArgs e)
{
Intermediate intermediate = new Intermediate();
DialogResult dialogues = intermediate.ShowDialog();
if (e.Equals("solutionPanel"))
{
personPanel.Visible = false;
}
else
{
personPanel.Visible = true;
}
Please I want this: if I hover over solutionPanel, problemPanel should become invisible and intermediate dialog should show. everything is ok but only the if statement.
-
March 15th, 2012, 11:26 AM
#2
Re: if statement with mousehover event
needmuch more code than that
-
March 16th, 2012, 02:54 AM
#3
Re: if statement with mousehover event
Code:
private void solutionPanel_MouseHover(object sender, EventArgs e)
{
Intermediate intermediate = new Intermediate();
DialogResult dialogues = intermediate.ShowDialog();
var btn = sender as Panel;
if (btn != null)
{
if (btn == solutionPanel)
{
problemsPanel.Enabled = false;
solutionPanel.Enabled=true;
}
else
{
problemsPanel.Enabled=true;
solutionPanel.Enabled=true;
}
}
}
This is what I want: there are 2 panels 1 form, when I hover solutionPanel I want the problemPanel boolean state to become false, that is disabled, and solutionPanel which I set the boolean state as false to become true, that is enabled, and the dialog(intermediate to show) .
Thanks hope I am communicating.
Last edited by ken4ward; March 16th, 2012 at 05:31 AM.
-
March 16th, 2012, 03:21 AM
#4
Re: if statement with mousehover event
Er. You will need to write the code for your project. However, we can help. What happens when you hover and how does this deviate from the behavior you desire?
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|