Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Cut, Copy, Paste methods

I have turned off the EditContextMenu property, and coded the context menu right-click for Cut, Copy, Paste, plus some specific other ones.

I was finding that the functions felt clunky, ie not immediately happening.
I then realised it only refreshed the control when I moved the mouse.
So, actioning a Cut message did nothing until I moved.

I then fired the UpdateCellEdit method, and it was all OK, but then the cell was not in edit mode.
I then added the EditCell event to keep the cell in edit mode, and its better, but then the cursor position changes.

Is there any solution that will make the Cut/Paste etc events fire and refresh and remain where the cursor is.

Thanks

Colin

Comments

  • So, the cut/copy/paste is done on the cell that is currently in edit mode? And it's that cell itself that isn't updating? FWIW, when a cell is in edit mode, it's really just an EDITLINE control floating in place of the cell, so I don't see why the standard windows control wouldn't redraw.

    Odd. I'll have to take a look tomorrow.
  • So far I've been unable to recreate this. I presume you're using the ShowContextMenu method and the OnContextMenuClick event provided by the control? Are you also using the table's built in Cut, Copy, and Paste methods? It always repaints as soon as I click the menu item.
  • Kevin

    The Code I Emailed you just recently was also the same causing this issue.
    Try adding several words to the cell, select one and then right-click and select Cut, but don't move the mouse when doing this. You should be able to replicate.

    This is using the controls built in Cut/Copy/Paste, and code supplied has this so you can check.
    Eg Call Send_Message(OLE_DESCTABLE,"OLE.Cut",SelPos)

    Colin
  • Yeah, this is the same issue as the CellMerge thread, so we'll call this fixed for now. I'll let you know when there's a release (or prerelease) build available.
  • Confirmed that this is resolved in 3.1.4.RC1
Sign In or Register to comment.