Re: changing button text for dialog_message [message #38855 is a reply to message #38769] |
Wed, 31 March 2004 05:26  |
timothy.williams
Messages: 20 Registered: October 2001
|
Junior Member |
|
|
Ben Tupper <btupper@bigelow.org> wrote in message news:<c4cjfj$2h32a0$1@ID-189398.news.uni-berlin.de>...
> Tim Williams wrote:
>> Is there a way to change the text in the buttons for dialog_message
>> from Yes/No to something else? I have an application where I want to
>> prompt the user to do one of two things. Dialog_message(/question)
>> seems to fit the bill, except I'd rather have something instead of
>> Yes/No e.g. 'Do this'/'Do that'.
>>
>> Thanks.
>
> Would this do it? It's just a quick hack - so caveat emptor.
>
> IDL> print, dialog_Choice(['yes', 'no', 'maybe'], message = 'Well??')
>
> maybe
>
(snip)
I guess so. I was really trying to avoid writing another routine that
would be just like dialog_message. I guess I was hoping for some
undocumented keywords like
result=dialog_message("Modify or delete?", /question, /cancel, $
button0='Modify', button1='Delete')
case result of
'Modify':begin
;modify something
end
'Delete':begin
;just delete it
end
'Cancel':break
endcase
I'm using the standard 'Yes/No' now to do what I want, but it would be
nice to be able to just relabel the buttons.
|
|
|