G
Guest
We have a Windows Form developed through .NET C# with a variety of
components, including objects of type TextBox, PropertyGrid, RichTextBox, and
DataGrid. Our Form includes menu items for cut, copy, and paste. Our
intention is to use these menu items to move text-type information between
the clipboard and certain components. We would like those menu items to
perform for the current active component, if appropriate. For instance, if
text is selected within one of the text boxes and the cut menu item is
invoked, we would like that text to be cut out of the text box and placed
into the clipboard. The TextBoxBase class makes this easy for objects of
type TextBox. However, we’re not sure how to do it when text is selected
within other types of components. For instance, we’re not sure how to apply
cut, copy, or paste when a string-type property value is selected within a
PropertyGrid. Is there a way to do this – specifically for string values
presented through a PropertyGrid? And, more generically, is there a way we
can apply cut, copy, and paste operations to the current selected component,
when those operations are appropriate for that component?
components, including objects of type TextBox, PropertyGrid, RichTextBox, and
DataGrid. Our Form includes menu items for cut, copy, and paste. Our
intention is to use these menu items to move text-type information between
the clipboard and certain components. We would like those menu items to
perform for the current active component, if appropriate. For instance, if
text is selected within one of the text boxes and the cut menu item is
invoked, we would like that text to be cut out of the text box and placed
into the clipboard. The TextBoxBase class makes this easy for objects of
type TextBox. However, we’re not sure how to do it when text is selected
within other types of components. For instance, we’re not sure how to apply
cut, copy, or paste when a string-type property value is selected within a
PropertyGrid. Is there a way to do this – specifically for string values
presented through a PropertyGrid? And, more generically, is there a way we
can apply cut, copy, and paste operations to the current selected component,
when those operations are appropriate for that component?