Combo-box enhanced input field

Features wanted...
highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Combo-box enhanced input field

Post by highend »

Can we get an enhanced input() that displays a small drop-down arrow on the right side that lets us selected from a given list of items?

E.g.

Code: Select all

input(topic, [notes], [default], [style=s|m|w], [cancel], [width=800], [height=400], [a pipe or <CRLF> separated list of item(s) for the combo-box entries])
Reverting to html for this kind of standard dialog is always a bit cumbersome...
Animation.gif
You do not have the required permissions to view the files attached to this post.
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Combo-box enhanced input field

Post by klownboy »

That's a great idea, and if/when desired the "default" input could be one of the listed items in the drop-down. +1

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

and if/when desired the "default" input could be one of the listed items in the drop-down
It should be prefixed with a "+" if one should be the default. Otherwise the input field should be left empty
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Combo-box enhanced input field

Post by klownboy »

highend wrote: 13 Jul 2021 15:06 It should be prefixed with a "+" if one should be the default.
So as not to break old code, the "default" field would have to remain. If a drop-down list is provided the default would, as you say, be designated by the + prefixed item and the default field ignored if not blank.

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Combo-box enhanced input field

Post by admin »

Isn't that functionally quite like inputselect()?

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

It adds a bit of its basic functionality to input()

I have dozens of use-cases in my scripts for this: Remember what was typed in before and give easy access to it (not only for a single entry^^) but let's you start from scratch as well.

E.g.: In my Everything script, remember e.g. the last 10 searches instead of the necessity to type them in again...
One of my scripts helped you out? Please donate via Paypal

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

*bump*
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Combo-box enhanced input field

Post by admin »

So it's about select and also type, right? Like in the Quick Search dialog.

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

Yepp
One of my scripts helped you out? Please donate via Paypal

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

Thanks for v22.10.0001!

One small issue:
The first entry of an item list is missing...

Code: Select all

    $lastQuery = "ext:pbi c:prototype|/d everything|/f @Test.xys";
    $query = input("Everything", 7:=$lastQuery);
ext:pbi c:prototype is not in the drop-down list...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Combo-box enhanced input field

Post by admin »

Whoops, should have noted that. Fix coming... As compensation you will get an icon parameter... :)

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

Fixed with v22.10.0002

Great new asset!
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Combo-box enhanced input field

Post by klownboy »

highend wrote: 21 Jul 2021 00:08 Great new asset!
One more tool in the XY toolbox. Thanks! :tup: :appl:

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combo-box enhanced input field

Post by highend »

[icon] is nice but it would be a lot nicer if it'd support files as well (png, ico, exe)... :mrgreen:
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Combo-box enhanced input field

Post by eil »

+1 i'd wish ico, png, exe could be supported as icons for anything all over XY. :roll:
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply