It is currently May 19th, 2021, 12:20 am

Bang to shutter an inputtext box

Help with creating, editing & fixing problems with skins
napoleonanderson
Posts: 1
Joined: April 24th, 2021, 7:19 am

Bang to shutter an inputtext box

Post by napoleonanderson »

I'd like to close an inputtext box with a bang (FocusDismiss is not ideal). As far as I can tell, no bang exists. Is there a way to close the inputtext field with the command prompt or some other method?
User avatar
balala
Rainmeter Sage
Posts: 12670
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Bang to shutter an inputtext box

Post by balala »

napoleonanderson wrote: April 24th, 2021, 7:21 am Is there a way to close the inputtext field with the command prompt or some other method?
Press Esc.
User avatar
CodeCode
Posts: 300
Joined: September 7th, 2020, 2:24 pm

Re: Bang to shutter an inputtext box

Post by CodeCode »

Or, <Enter> that's what I use for any of my text inputs - that is the key to getting the input to stay, along with !WriteKeyValue Bang in tandem with !Setoption Bang.
Can't fix it if it ain't broke - unless it is in code.
User avatar
jsmorley
Developer
Posts: 21694
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Bang to shutter an inputtext box

Post by jsmorley »

Once an InputText field has been activated, it will remain open, maintain focus, and be forced to the top/front until one of three things happens:

1) You hit Enter, which will accept and use the value you enter and close the InputText field.
2) You hit ESC, which will ignore anything entered and close the InputText field.

3) With the optional FocusDismiss=1 set, a click anywhere outside the InputText field will ignore anything entered and close the InputText field.
User avatar
CodeCode
Posts: 300
Joined: September 7th, 2020, 2:24 pm

Re: Bang to shutter an inputtext box

Post by CodeCode »

Also useful is this used to execute a bang when FocusDismiss=1
OnDismissAction
A bang or action that is executed when an active InputText field is dismissed without hitting Enter to execute the plugin commands.
Can't fix it if it ain't broke - unless it is in code.
User avatar
balala
Rainmeter Sage
Posts: 12670
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Bang to shutter an inputtext box

Post by balala »

CodeCode wrote: April 27th, 2021, 8:15 pm Also useful is this used to execute a bang when FocusDismiss=1
OnDismissAction
Not entirely sure why, but napoleonanderson said in his first post here that:
napoleonanderson wrote: April 24th, 2021, 7:21 am (FocusDismiss is not ideal)
User avatar
CodeCode
Posts: 300
Joined: September 7th, 2020, 2:24 pm

Re: Bang to shutter an inputtext box

Post by CodeCode »

balala wrote: April 27th, 2021, 8:23 pm Not entirely sure why, but napoleonanderson said in his first post here that:
oops. i skipped to the replies and did not really read carefully the original post. :Whistle
Can't fix it if it ain't broke - unless it is in code.