|
List Info
Thread: Re: Dialogs: OK button can't call macros?
|
|
| Re: Dialogs: OK button can't call
macros? |

|
2007-01-25 01:01:49 |
|
Johnny Andersson wrote:
> Hi again...
>
> 2007/1/24, Malte Timmermann sun.com>:
>>
>> 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...
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|