Andrews answer is totally correct.

But one comment to using "normal" buttons to close the dialog:
It's true that you can close the dialog via endExecute(), but we forgot
to allow passing a value to the function, to be used as a return value
for execute().
So if you close a dialog this way, execute() always returns 0 :(

An other thing is that you can't cancel a dialog with ESC when not
having a standard Cancel button.

Malte.

Andrew Douglas Pitonyak wrote, On 01/25/07 08:01:
> 
> Johnny Andersson wrote:
>> Hi again...
>>
>> 2007/1/24, Malte Timmermann <[EMAIL PROTECTED]>:
>>> This will return 0 for Cancel, something else (1) for OK.
>>>
>>> So if execute() doesn't return 0, do your stuff.
>>
>> One thing comes to my mind then: When dlg.execute() is finished (user
>> clicked OK or Cancel), I can "do my stuff", which is to use the data from
>> the dialog, such as date, time and other info that the user selected, 
>> isn't
>> that data lost when the dialog is closed?
>>
>> Johnny
>>
> Although the dialog is closed, you can still access the dialog; only the 
> view is gone. So, you can access the controls and extract information.
> Also, if you do not use an OK or Cancel button, you can still write your 
> own button event handler that closes the dialog. This assumes, of 
> course, that you can access the dialog from within your handler. To do 
> this, you must store a reference to the dialog in a variable that is 
> publically visible in your method. I would provide more information, but 
> I really need to sleep...
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to