Closing dialogs

Login to reply to this topic.
Mon, 2003-12-15 07:31
Joined: 2003-10-17
Forum posts: 16
Is it possible to close a dialog programmatically?  I've tried calling OkToExitL and also PrepareForcedExitL.  In both cases the OkToExitL method executes correctly and returns ETrue but the dialog doesn't close.  When I click a button on the dialog it closes correctly.

Thanks,

Tue, 2003-12-16 15:48
Joined: 2003-10-24
Forum posts: 21
Closing dialogs
You should be able to call MakeVisible( EFalse ) on the dialog, just to hide it.

Paul
Addicted to phones

Tue, 2003-12-16 23:37
Joined: 2003-10-17
Forum posts: 16
Closing dialogs
yeah, I've tried that but actually need the dialog to exit.  I'm thinking that what I need to do is write my own control to replace the dialog.  Does anyone know if it is even possible to close a dialog programmatically?
Tue, 2003-12-16 23:38
Joined: 2003-05-27
Forum posts: 363
Closing dialogs
Do it like this:

Code:
delete dialog;

Cheers,
Pawel
Fri, 2004-01-23 10:52
Joined: 2003-05-15
Forum posts: 53
do not use delete
it's the wrong thing to do.

CEikDialog::TryExitL(TInt aButtonId)

is the correct function to call.
you can specify the Id of the button (pratically it's like the user tapping the specified button)
  • Login to reply to this topic.