This is a migrated thread and some comments may be shown as answers.

MonthCellElement mousedown event

1 Answer 33 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Versile
Top achievements
Rank 1
Versile asked on 11 Jun 2009, 05:12 AM
Hi,

I'm trying to make a custom context menu for the MonthCellElement using the mousedown event, but when I right click and it executes the below code it always opens the context menu in a different position than it should.

        void sch_mousedown(object sender, MouseEventArgs e) 
        { 
            if (e.Button == MouseButtons.Right) 
            { 
                string x = sender.ToString(); 
                MonthCellElement element = (MonthCellElement)sender; 
                int stuff = e.Location.X; 
                stuff = e.Location.Y; 
                _sch_context.Show(element, e.Location); 
            } 
        } 

1 Answer, 1 is accepted

Sort by
0
Versile
Top achievements
Rank 1
answered on 11 Jun 2009, 05:44 AM
answered my own question, handle the scheduler contextmenushowing event and then use e.element to get the MonthCellElement
Tags
Scheduler and Reminder
Asked by
Versile
Top achievements
Rank 1
Answers by
Versile
Top achievements
Rank 1
Share this question
or