Page 1 of 1

Add CANCEL to InputRequester

Posted: Sat May 04, 2024 9:08 pm
by tikidays
Can a #PB_InputRequester_Cancel option be added to the InputRequester?

Code: Select all

Text$ = InputRequester(Title$, Message$, DefaultText$ [, Flags [, ParendID]])

Re: Add CANCEL to InputRequester

Posted: Sat May 04, 2024 11:41 pm
by Quin
Huge +1 on this. Also, a way to detect specifically escaping/canceling out of an input requester would be incredibly helpful, instead of just always giving a blank string :)

Re: Add CANCEL to InputRequester

Posted: Sun May 05, 2024 2:27 am
by BarryG
+1

This has been asked before, with one of the earliest 22 years ago:

https://www.purebasic.fr/english/viewtopic.php?p=6160

Other times:

https://www.purebasic.fr/english/viewtopic.php?p=362219
https://www.purebasic.fr/english/viewtopic.php?p=475585
https://www.purebasic.fr/english/viewto ... 17#p350917

I don't understand why it's been ignored for so long. How hard can it be? And returning an empty string is NOT the same thing as canceling, because sometimes you want the user to be able to specify an empty string (such as for an optional piece of text). So when canceling, it could return something that the user can't easily type, such as Chr(1), which is actually what I use for my own custom requester.