IMHO I agree with that too. That's the normal way should be, not to hide and be disabled it in place to prevent hotkey or any action with that button or any other control.esgici wrote:For des-activate hot (accelerator) key (with or without "hide") of a control, needs use "Disable" ( Enable := .F. ) or "Release" method.
Hide/Show Control accelerator key
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Hide/Show Control accelerator key
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Hide/Show Control accelerator key
Do not think it's wrong, I think this is related to the need of each, sometimes used and sometimes not !.esgici wrote:IMO: "Hidden" not means "not exist"; although control is invisible, hot key should be active. So, this behavior of VFP isn't correct.
And I think to hide you have to disable the hotkey, and that's why hide it, lest this to the user's hand, and also as Mr. Esgici says, with "Enable:. = .F" or "Release" method, would be the three options!
regards
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Hide/Show Control accelerator key
What he said Esgici is true, HMG is a mask to facilitate programming in Windows and therefore must be programmed thinking how the operating system works, is not a good idea to create mechanisms that go against the logic of Windows system.esgici wrote:IMO: "Hidden" not means "not exist"; although control is invisible, hot key should be active. So, this behavior of VFP isn't correct.danielmaximiliano wrote: I think in VFP to create a Control it has the property HOTKEY , this to hide that property goes down.
For des-activate hot (accelerator) key (with or without "hide") of a control, needs use "Disable" ( Enable := .F. ) or "Release" method.
Viva HMG
Code: Select all
Form_1.Button_1.Enabled := .F.
Form_1.Button_1.Hide
...
Form_1.Button_1.Show
Form_1.Button_1.Enabled := .T.
Re: Hide/Show Control accelerator key
Creo que todo depende "de la necesidad del momento" en mi caso, la necesidad es que en el mismo formulario se definen
varios controles y en cierto momento algunos se ocultan y tienen su hotkey definida.
La intencion de ocultarlos, es para que no esten presentes en la pantalla y por lo tanto, su hotkey no este activo,
ya que el usuario por error puede oprimir ese conjunto de teclas cuando no debe.
No puedo ponerlos " .Enabled := .T." porque siguen apareciendo en pantalla y no puedo darle "Release" porque lo seguiré ocupando.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
I think it all depends "on the need of the moment" in my case, the need is in the same form multiple controls are defined
and at one point some are hidden and have their defined hotkey.
The intention of hiding, is for that are not present on the screen and therefore its hotkey not this asset, since the user
can press mistakenly that set of keys when it should not.
I can not put ".enabled:. = .T" because they follow on-screen and I can not give "Release" because I keep taking.
Lo ideal sería que utilizáramos la programación como se debe pero siempre tenemos la posibilidad de "darla la vuelta"
dependiendo de la necesidad.
------------------------------------------------------------------------------------------------------------------------------------------
Ideally, we used the program as it should but we always have the ability to "give it around" depending on the need.
Lo siento, apenas vi el post del Dr. Soto...
----------------------------------------------------
Sorry, just saw the post from Dr. Soto ...
varios controles y en cierto momento algunos se ocultan y tienen su hotkey definida.
La intencion de ocultarlos, es para que no esten presentes en la pantalla y por lo tanto, su hotkey no este activo,
ya que el usuario por error puede oprimir ese conjunto de teclas cuando no debe.
No puedo ponerlos " .Enabled := .T." porque siguen apareciendo en pantalla y no puedo darle "Release" porque lo seguiré ocupando.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
I think it all depends "on the need of the moment" in my case, the need is in the same form multiple controls are defined
and at one point some are hidden and have their defined hotkey.
The intention of hiding, is for that are not present on the screen and therefore its hotkey not this asset, since the user
can press mistakenly that set of keys when it should not.
I can not put ".enabled:. = .T" because they follow on-screen and I can not give "Release" because I keep taking.
Lo ideal sería que utilizáramos la programación como se debe pero siempre tenemos la posibilidad de "darla la vuelta"
dependiendo de la necesidad.
------------------------------------------------------------------------------------------------------------------------------------------
Ideally, we used the program as it should but we always have the ability to "give it around" depending on the need.
Lo siento, apenas vi el post del Dr. Soto...
----------------------------------------------------
Sorry, just saw the post from Dr. Soto ...
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.