Function

TfrmConsults.CustomCanFocus

Module

fConsults

Last Modified

7/15/2014 3:26:34 PM

Comments

CB
*****************************************************************
                  Delphi's Can Focus has a bug.
     Source: http://qc.embarcadero.com/wc/qcmain.aspx?d=11229
 *****************************************************************

Visibility

Public

Owner

TfrmConsults

Declaration

function CustomCanFocus(Control: TWinControl): Boolean; //CB

Called-By Hierarchy


        TfrmConsults.CustomCanFocus
TfrmConsults.ProcessNotifications┘ 
       TfrmConsults.DisplayPage┘   

Called-By

Name Declaration Comments
TfrmConsults.ProcessNotifications procedure ProcessNotifications; -


Source

3308  function TfrmConsults.CustomCanFocus(Control: TWinControl): Boolean;
3309  var
3310    Form: TCustomForm;
3311  begin
3312    Result := False;
3313    Form := GetParentForm(Self);
3314    if Form <> nil then
3315    begin
3316      Control := Self;
3317      repeat
3318        if not (Control.Visible and Control.Enabled) then
3319         Exit;
3320        Control := Control.Parent;
3321      until Control = nil;
3322      Result := True;
3323    end;
3324  end;