[Gambas-user] InputBox: Cancel pressed

Benoit Minisini gambas at ...1...
Sat Nov 17 19:02:13 CET 2007


On samedi 17 novembre 2007, Colin Clark wrote:
> Hello Benoit et al
>
> When using the InputBox I need to differentiate between when Cancel is
> pressed and when the inputbox is deliberately left blank and OK pressed.
> Because a string is returned, I can find no way to do that.
>
> So I have solved my problem by changing my local copies of the InputBox
> class to return a Variant rather than a String. Now when Cancel is pressed
> I get FALSE returned, and I can check for that with:
>
> IF NOT IsBoolean(vReturn) THEN
>
> I do hope Gambas does not follow Microsoft's lead and decide that variants
> are bad for us and must be eliminated... :)
>
>
> Colin Clark..

Well, InputBox was only done for the lazy ex-VB users. 

I think that making your own dialog box like you did is the only real 
solution.

-- 
Benoit Minisini




More information about the User mailing list