Hi,
I have a copy and a paste button on my UI. I want to enable Paste button when there are some copied nodes on the clipboard. I know one workaround is to set a bool when calling CopySelectedNodes() for e.g.
bool hasCopiedNodes = ultraTree1.CopySelectedNodes(); if(hasCopiedNodes) btnPaste.Enabled = true;
bool hasCopiedNodes = ultraTree1.CopySelectedNodes();
if(hasCopiedNodes)
btnPaste.Enabled = true;
if i have Enabled the paste button, what if somehow the clipboard get cleared or the copied data is no longer available, How can i know that the Copied data is no longer available on the basis of which i will disable my Paste button.
It would seem that the Clipboard class does not expose any events that fire when the contents change, so the only solution I can think of would be to call the GetData method on a timer to see if what it contains, and then enable/disable the button accordingly.