MonthCellElement mousedown event

2 posts, 0 answers
  1. Versile
    Versile avatar
    20 posts
    Member since:
    May 2009

    Posted 11 Jun 2009 Link to this post

    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); 
                } 
            } 

  2. Versile
    Versile avatar
    20 posts
    Member since:
    May 2009

    Posted 11 Jun 2009 Link to this post

    answered my own question, handle the scheduler contextmenushowing event and then use e.element to get the MonthCellElement
Back to Top