N
NvrBst
ListView is in Detailed Mode, and an Item is in EditMode
(ListViewItem.BeginEdit()), how, if any, would I get the currently
highlighted portion of the text?
Basically I have a ctrl-c shortcut that copies the entire line of the
currently selected items, however, if the user is in Edit Mode I'd
like it just to copy what the user has selected (IE Default Behavior
of Ctrl-C). If I ignore my copy method, "if(InEditMode) return;" then
the default behavior doesn't trigger; I'd need a "if(InEditMode)
{Handled=false; return;}" type thing which doesn't exist I don't
think, so now I'm trying to do "if(InEditMode) Copy Highlighted
Portion of listView1.SelectedItem[0].Text".
Another way would be when entering edit mode to do
"copyMenuItem.ShortCutKeys = Keys.None;" and in the "AfterItemEdit
Event" do "copyMenuItem.ShortCutKeys = origKeys", however, I don't
like how the shortcut disappears in the menu with this method.
Is there an easy/simple alternative to my problem (select currently
highlight text method someplace? Something special with the ShortCut
system I can do with sender maybe to say I never handled the event and
to keep propgating it? Or something else to this problem that I don't
know about?
Thanks
(ListViewItem.BeginEdit()), how, if any, would I get the currently
highlighted portion of the text?
Basically I have a ctrl-c shortcut that copies the entire line of the
currently selected items, however, if the user is in Edit Mode I'd
like it just to copy what the user has selected (IE Default Behavior
of Ctrl-C). If I ignore my copy method, "if(InEditMode) return;" then
the default behavior doesn't trigger; I'd need a "if(InEditMode)
{Handled=false; return;}" type thing which doesn't exist I don't
think, so now I'm trying to do "if(InEditMode) Copy Highlighted
Portion of listView1.SelectedItem[0].Text".
Another way would be when entering edit mode to do
"copyMenuItem.ShortCutKeys = Keys.None;" and in the "AfterItemEdit
Event" do "copyMenuItem.ShortCutKeys = origKeys", however, I don't
like how the shortcut disappears in the menu with this method.
Is there an easy/simple alternative to my problem (select currently
highlight text method someplace? Something special with the ShortCut
system I can do with sender maybe to say I never handled the event and
to keep propgating it? Or something else to this problem that I don't
know about?
Thanks