遇到 DBGrid 自動關閉輸入法問題, 可修改原碼重新編譯後即可解決
修改地方如下
修改地方如下
還需要修改下列地方,否則編輯完成後離開輸入法還是會變化procedure TCustomDBGrid.WMKillFocus(var Message: TMessage); begin ImeName := Screen.DefaultIme; ImeMode := imDontCare; inherited; //拿掉此行, 避免輸入法關閉 {if not ((InplaceEditor <> nil) and (HWND(Message.WParam) = InplaceEditor.Handle)) then ActivateKeyboardLayout(Screen.DefaultKbLayout, KLF_ACTIVATE);} end;
procedure TDBGridInplaceEdit.WMKillFocus(var Message: TWMKillFocus); //去掉 {if HWND(Message.FocusedWnd) <> Grid.Handle then ActivateKeyboardLayout(Screen.DefaultKbLayout, KLF_ACTIVATE);}