You've already forked lazarus-ccr
RxFPC: Fixed a bug when the TRxCloseFormValidator on TFrame
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2694 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -305,11 +305,19 @@ end;
|
|||||||
function TRxCloseFormValidator.CheckCloseForm: boolean;
|
function TRxCloseFormValidator.CheckCloseForm: boolean;
|
||||||
var
|
var
|
||||||
i:integer;
|
i:integer;
|
||||||
|
F:TComponent;
|
||||||
begin
|
begin
|
||||||
|
F:=Owner;
|
||||||
|
while Assigned(F) and not (F is TCustomForm) do
|
||||||
|
F:=F.Owner;
|
||||||
|
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
|
||||||
|
if not Assigned(F) then exit;
|
||||||
|
|
||||||
for i:=0 to FItems.Count-1 do
|
for i:=0 to FItems.Count-1 do
|
||||||
begin
|
begin
|
||||||
if FItems[i].Enabled and (not FItems[i].CheckClose(Owner as TCustomForm)) then
|
if FItems[i].Enabled and (not FItems[i].CheckClose(F as TCustomForm)) then
|
||||||
begin
|
begin
|
||||||
FItems[i].SetFocus;
|
FItems[i].SetFocus;
|
||||||
Application.MessageBox(PChar(FItems[i].ErrorMessage), PChar(FErrorMsgCaption), MB_OK + MB_ICONERROR);
|
Application.MessageBox(PChar(FItems[i].ErrorMessage), PChar(FErrorMsgCaption), MB_OK + MB_ICONERROR);
|
||||||
|
Reference in New Issue
Block a user