i have a custom control derived from usercontrol (called popupwin). I have
another usercontrol (called extensionbutton). In the extension button i
have declared a variable as follows:
private PopupWindow mUserPopWin;
i create a new instance of the popupwin and provide necessary vars.
this.mUserPopWin = new PopupWindow();
this.mUserPopWin.UserName = this.List.Name;
this.mUserPopWin.UserPhone = this.List.Number;
this.mUserPopWin.ImageUrl = this.List.Picture;
this.mUserPopWin.Visible = false;
now what i want to do is to make the popupwin visible when user mouse is
over the button.
private void ExtensionButton_MouseHover(object sender, System.EventArgs e)
{
ExtensionButton b = ((ExtensionButton)sender);
b.DisableTooltip();
Rectangle btnRect = b.RectangleToScreen(new Rectangle(b.Location,b.Size));
mUserPopWin.Location = btnRect.Location;
mUserPopWin.Visible = true;
mUserPopWin.BringToFront();
}
private void ExtensionButton_MouseLeave(object sender, System.EventArgs e)
{
ExtensionButton b = ((ExtensionButton)sender);
b.DisableTooltip();
mUserPopWin.Visible = false;
}
When i debug i see the code being executed but the window never popup
(becomes visible) what am i doing wrong?
thanks