Hi
In my Windows Form application I created a File Browser control that was
derived from System.Windows.Forms.UserControl. It contains a single line text
box and a button. The user can enter a filename in the text box or hit the
browse button which pops up the File Open Dialog box and lets the user select
a file. The subsequent selection is placed in the text box.
This control is placed in a DataGrid using a column derived from
DataGridColumnStyle. Everything works great except when Iâ??m entering text in
the text box of my File Browser control, hitting Left, Right, Home, or End
moves the current cell in the DataGrid instead of moving the caret in the
text box.
Iâ??ve found that if I derive a class from TextBox and use that in my
UserControl instead of using the stock TextBox, override the ProcessCmdKey()
method, and move the caret myself, I can get this to work correctly.
This seems really sloppy though. I donâ??t know why the TextBox is not using
and keeping the keys instead of ignoring them and letting the messages bubble
up to the grid control.
Anyone have any ideas? Any help would be appreciated.
Thanks