I'm trying to program three menu items to respectively perform cut, copy and paste operations on TTMSFMXGrid components. (Ctrl+X, Ctrl+C, Ctrl+V work out of the box but I am having some difficulty doing it through menu items.)
I figured out how to do it if entire cells are selected. I don't know if this is the best method but it works for entire cells:
ActiveObj := Focused.GetObject;
if Assigned(ActiveObj) then
if ActiveObj is TTMSFMXGrid then
TTMSFMXGrid(ActiveObj).CutToClipboard(True) ;
But I cannot figure out how to do it if the user is editing a cell and has selected all or part of the cell text.