Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
context menu in a time slot editor
posted
how can i set the context menu editor, when editing inside a time slot line? is there a way i get mouse down event?
Thanks, Marcelo.
Parents
No Data
Reply
  • 69832
    Offline posted

    EditorWithText editor = new EditorWithText();
    this.dayView.AppointmentEditor = editor;
    editor.AfterEnterEditMode += new EventHandler(this.editor_AfterEnterEditMode);
    editor.BeforeExitEditMode += new BeforeExitEditModeEventHandler(editor_BeforeExitEditMode);

    private void editor_AfterEnterEditMode(object sender, EventArgs e)
    {
        ContextMenu contextMenu = new ContextMenu();
        contextMenu.MenuItems.Add( "One" );
        contextMenu.MenuItems.Add( "Two" );
        contextMenu.MenuItems.Add( "Three" );

        this.dayView.Controls[0].ContextMenu = contextMenu;
    }

    private void editor_BeforeExitEditMode(object sender, BeforeExitEditModeEventArgs e)
    {
        //  TODO: Clean up context menu
    }

Children
No Data