What is this form, a hommemade dialog? It should still be a form with form
events. What events does it have? If it's a form.Showmodal situtation, you can
control the closing from OnClose as well by using the ModalResult value. In the
button events, do your testing and only return a ModalResult := mrOK if the
tests pass.
DJS
Rizky Eka Vianto <[EMAIL PROTECTED]> wrote:
Thanks david but wwrecordviewdialog doesn't have the OnCloseQuery event,
I have to take it from wwRecordViewDialog1.RecordViewForm and it still
doesn't work look at my code below (code1) did I miss something ?, and
I've tried other way for this...set the properties for
okcanceloptions|rvokShowOKCancel to false and borderstyle to bsnone
(hide all exit path) and it works fine (see code2). there must be a
better way than this ? TIA
Code1 :
procedure TForm1.wwRecordViewDialog1InitDialog(Form: TwwRecordViewForm);
begin
can:=false; // Public Boolean variable
end;
//field that must be filled
procedure TForm1.ADOTable1dtCalibrateChange(Sender: TField);
begin
can := true;
end;
procedure TForm1.wwRecordViewDialog1CloseDialog(Form:
TwwRecordViewForm);
begin
wwRecordViewDialog1.RecordViewForm.OnCloseQuery
(wwRecordViewDialog1,can);
end;
Code2 :
procedure TForm1.wwRecordViewDialog1InitDialog(Form: TwwRecordViewForm);
begin
can:=false; // Public Boolean variable
end;
//field that must be filled
procedure TForm1.ADOTable1dtCalibrateChange(Sender: TField);
begin
can := true;
end;
procedure TForm1.ADOTable1AfterPost(DataSet: TDataSet);
begin
if can then
begin
if wwRecordViewDialog1.RecordViewForm <> nil then
begin
wwRecordViewDialog1.RecordViewForm.Close;
end;
end;
end;
_____
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: 15 Maret 2005 21:23
Look at the OnCloseQuery event. That's exactly what it's for.
DJS
Rizky Eka Vianto <[EMAIL PROTECTED]> wrote:
Hello,
I want my wwrecordviewdialog stays showing when the user
click ok, cancel or hit esc button If the user didn't fill some field in
my recordviewdialog and post it. Can someone show me how to do that...
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups SponsorADVERTISEMENT
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/