[Lazarus] How to create a non focusable form?

Zeljko zeljko at holobit.net
Tue Oct 27 17:39:35 CET 2015



On 10/27/2015 05:07 PM, Gabor Boros wrote:
> 2015.10.27. 16:16 keltezéssel, Zeljko írta:
>>
>> csNoFocus does not work for Qt ? Can you provide example ?
>> For Qt: before example try to include qt4 and qtwidgets into your unit
>> and then
>> in CreateWnd of your custom form (or after form handle is created)
>>
>> TQtMainWindow(YourForm.Handle).SetFocusPolicy(QtNoFocus);
>> TQtMainWindow(YourForm.Handle).WindowArea.SetFocusPolicy(QtNoFocus);
>
> WindowArea not exist, found ScrollAera which is TQtWindowArea type.

Yes, sorry, I've mistyped ... written from memory.

> But not have any effect for me. Example attached (without Qt and
> WMNCHitTest trick).

WMNCHitTest is windows only thing afair, but I'll check your example 
with Qt under linux.

zeljko




More information about the Lazarus mailing list