It is currently April 25th, 2024, 10:37 am

Strange issue with InputText

Report bugs with the Rainmeter application and suggest features.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue with InputText

Post by jsmorley »

The way it works is that the InputText plugin creates an entirely separate "Windows control", an entity that is entirely distinct from the "Skin window". This control will by design always have focus when activated, and will stay on top of any other meter(s) in the skin. While the control is active, IT WILL have control of everything. it will maintain focus at all times, and no other action can be take on the skin by the user.

While the plugin is active, it is in a sense creating the control in a entirely different "window", and that separate window has complete control over the mouse. The skin is locked out of things at that point. You can click on and interact with other skins, other windows or other interface elements that are NOT part of the skin in question, but you can't interact with the skin, other than interacting with the control.

FocusDismiss=1 (the default)
If the mouse is clicked anywhere outside of the control it will destroy the control without collecting any of the text entered, and without executing any command associated with it. The skin will regain control of mouse actions. This is in effect the same as hitting Escape. Any OnDismissAction defined will be executed.

FocusDismiss=0
The control will maintain focus, and no mouse action anywhere outside of the control will have any effect. You can't click on actions in the skin, you can't drag the skin, you can't right-click the skin. You simply cannot get out of the control when this is set, unless you hit Enter or Escape.

In either case while the control is active:

Hitting Enter will collect any text entered, destroy the control, set the value of the measure to the text, and execute the action associated with the Command[N] option.

Hitting Escape will destroy the control without collecting any of the text entered, and without executing any command associated with it. Any OnDismissAction defined will be executed.
soyelrafa
Posts: 96
Joined: March 1st, 2017, 3:09 pm

Re: Strange issue with InputText

Post by soyelrafa »

eclectic-tech wrote: May 30th, 2020, 4:19 pm Aside from getting the example to work...

I have also had this 'exception' occur intermittently while using InputText measures...

I was able to correct by adding FocusDismiss=0 to the measure; this will cause the input box to maintain focus until either 'Enter' or 'Escape' are pressed. Not sure if this will help with your issue, but it corrected it for me. :welcome:
I will give it a try, thank you!
jsmorley wrote: May 30th, 2020, 4:36 pm The way it works is that the InputText plugin creates an entirely separate "Windows control", an entity that is entirely distinct from the "Skin window". This control will by design always have focus when activated, and will stay on top of any other meter(s) in the skin. While the control is active, IT WILL have control of everything. it will maintain focus at all times, and no other action can be take on the skin by the user.

While the plugin is active, it is in a sense creating the control in a entirely different "window", and that separate window has complete control over the mouse. The skin is locked out of things at that point. You can click on and interact with other skins, other windows or other interface elements that are NOT part of the skin in question, but you can't interact with the skin, other than interacting with the control.

FocusDismiss=1 (the default)
If the mouse is clicked anywhere outside of the control it will destroy the control without collecting any of the text entered, and without executing any command associated with it. The skin will regain control of mouse actions. This is in effect the same as hitting Escape. Any OnDismissAction defined will be executed.

FocusDismiss=0
The control will maintain focus, and no mouse action anywhere outside of the control will have any effect. You can't click on actions in the skin, you can't drag the skin, you can't right-click the skin. You simply cannot get out of the control when this is set, unless you hit Enter or Escape.

In either case while the control is active:

Hitting Enter will collect any text entered, destroy the control, set the value of the measure to the text, and execute the action associated with the Command[N] option.

Hitting Escape will destroy the control without collecting any of the text entered, and without executing any command associated with it. Any OnDismissAction defined will be executed.
I understand your explanation, but I don't understand why this is related to the issue I have since I don't click anywhere outside or do anything, actually I don't have time to do anything because the input text box dissappear one milisecond after appearing...

After your explanation I assume that If I do anything like clicking outside the issue that here happens is the expected behaviour, but maybe I didn't understand something or this doesn't explain the issue at hand...

In any case, thanks you again for taking the time on explaining the functioning of the plugin. I always learn something with your answers :thumbup: