InputRequester improvements and accessibility

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

InputRequester improvements and accessibility

Post by nsstudios »

Hi,

It would be great if InputRequester could be updated to fix/add the following:
  • [Done] If you need to go outside of the requester and go back into it, the keyboard focus is no longer on the edit field, and you can't get back into it with tab.
  • [Done] OK button is not focusable with tab.
  • It would be really useful if there was a way to distinguish between leaving the requester empty and pressing enter/clicking OK, and dismissing the requester with escape/system menu/Alt+F4, etc. Checking for #empty$ does not suffice sometimes e.g., letting the user leave the requester empty for the default action, but performing no action if it was dismissed .
  • It would also be very useful if InputRequester could have a flag that would pre-select the default content so that the user can just type over it.
Thanks.
Last edited by nsstudios on Sun Nov 05, 2023 9:07 pm, edited 1 time in total.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: InputRequester improvements and accessibility

Post by Olli »

nsstudio wrote:It would be really useful if there was a way to distinguish between leaving the requester empty and pressing enter/clicking OK, and dismissing the requester with escape/system menu/Alt+F4, etc.
It should return the default string.
AZJIO
Addict
Addict
Posts: 1315
Joined: Sun May 14, 2017 1:48 am

Re: InputRequester improvements and accessibility

Post by AZJIO »

1. The font is small, does not match the default font that is installed in the OS. For example, I have a font size of 11 everywhere, and I get a font of 8.5.
2. It is not possible to set the width of the window and, accordingly, the input field. I can't make an explanatory text, as only two words fit. It would be nice to set the height of the window where the text field is the width of the window minus the input field and the padding between them, then I can insert 2 or 3 lines of text using CRLF
nsstudios wrote: Wed Apr 22, 2020 9:04 am requester empty for the default action
Make the text "default" in the field DefaultText$. If the user wants an empty string, it will erase the text. You can also default to "Cancel" text in the DefaultText$ field.
Quin
Enthusiast
Enthusiast
Posts: 281
Joined: Thu Mar 31, 2022 7:03 pm
Location: United States
Contact:

Re: InputRequester improvements and accessibility

Post by Quin »

Big +1 to this. I want my app to only cancel if the user presses escape, not if they give me an empty string. There appears to be no way to do this. I will say though, I'm unable to reproduce the bug where keyboard focus is messed up. I think that was actually fixed somewhere, I think I saw it mentioned.
PB v5.40/6.10, Windows 10 64-bit.
16-core AMD Ryzen 9 5950X, 128 GB DDR5.
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

Re: InputRequester improvements and accessibility

Post by nsstudios »

The OK button not being tabbable to and lost focus bug were addressed in this topic:
[Done] Lost focus when re-entering InputRequester
Post Reply