I am porting some controls for my Cross Codebot library, and one of them is
a generic grid type control. The problem is on Ubuntu with Gtk pressing the
arrows keys causes my grid to lose focus, even though I am
handling WMGetDlgCode.

Here is  brief video of the problem:

https://www.youtube.com/watch?v=COpz4Sia1fY

And the relevent code:

procedure WMGetDlgCode(var Msg: TWMGetDlgCode); message WM_GETDLGCODE;

procedure TContentGrid.WMGetDlgCode(var Msg: TWMGetDlgCode);
begin
  inherited;
  Msg.Result := DLGC_WANTARROWS or DLGC_WANTCHARS or DLGC_WANTALLKEYS;
end;

Yet focus is still lose when my grid is focused and an arrow key is
pressed. Does anyone know how to stop focus from leaving under the
conditions I've outlined?

Thanks.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to