[Gambas-user] Observations on Message.Warning (1.9.43)

Benoit Minisini gambas at ...1...
Sat Oct 7 10:52:46 CEST 2006


On Friday 06 October 2006 06:09, Werner wrote:
> Consider this:
>
> Dim i as Integer
> i = Message.Warning ("Are you sure you want to delete all the records in
> the database?" , "Cancel" , "Delete")
>
> The first button is apparently the default so if the user just hits
> Enter a 1 is returned.
> Cancel button returns 1
> Delete button returns 2
>
> So far, so good.
>
> But if the user does not click any button and just closes the window by
> clicking on the top right close square a 2 is also returned.
>
> How about in this case returning something this is not in the range of
> buttons say 0 or -1?
>
>
> Regards
> Werner Dahn
>

This is because the default button is always the last one.

I just need to add a syntax so that the default button can be specified.

Regards,

-- 
Benoit Minisini





More information about the User mailing list