I have the need to make Modal ballons (w/ Ok/Cancel
buttons).
I added the following method to the BalloonWindow
class, but it always returns Cancel. Any help appreciated.
public DialogResult ShowDialog(Point pt)
{
DialogResult r = DialogResult.None;
// Move the balloon to anchor position.
MoveAnchorTo(pt);
// Show the balloon.
if(!Visible)
r = base.ShowDialog();
return r;
}
To test in the demo project, add a button to
MyBalloonWindow that has a DialogResult of Ok, then
change the call as follows:
Here's how I changed the demo project
private void button1_Click(object sender,
System.EventArgs e)
{
DialogResult r = DialogResult.None;
if(!__myBalloon.Visible)
{
__myBalloon.Shadow = true;
r = __myBalloon.ShowDialog(button1);
}
}
thanks
Logged In: YES
user_id=836002
Looks like you are using the balloon in a way that I did not
anticipate. I am currently refactoring and improving the library
so I will take a look at this and make sure that this scenario
works.