Hello everyone,
I have this scenario:
A windows forms application, which contains:
- a QTabControl (from Qios DevSuite) created in design view;
- a QTabPage created programmatically;
- a geckoWebBrowser inside the QTabPage, created programmatically as well.
The problem: I have 2 events in the QTabPage:
- QTabPage.MouseDown - executes perfectly
- QTabPage.NonClientAreaMouseDown - seems to not trigger at all. I don't understand why. How can an event not trigger at all? It does not enter the event handler.
And here is the code that makes the QTabPage, and those events:
private void QtabCreateNewPage()
{
QTabPage page = new QTabPage();
page.Text = "(New Tab)";
page.NonClientAreaMouseDown += new QNonClientAreaMouseEventHandler(page_NonClientAreaMouseDown);//seems to not trigger properly.
page.MouseDown += new MouseEventHandler(page_MouseDown);
qTabControl.Controls.Add(page);
}
void page_NonClientAreaMouseDown(object sender, QNonClientAreaMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
menuTabPages.Show(CurrentActivePage, e.Location);
}
}
void page_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
menuTabPages.Show(CurrentActivePage, e.Location);
}
The intellisense caption for NonClientAreaMouseDown says :
This event gets raised when the user clicks on the NonClientArea and the specified area is known. Like on the Caption or the Sizing area.
I am clicking the NonClientArea, but nothinig happens. I hope you can help with some hints, I've spent all day trying to solve this.
Thank you for any idea in advance.
Best regards,
Andrei Marius Cristof