Hide/Show Control accelerator key

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Hide/Show Control accelerator key

Post by Pablo César »

esgici wrote:For des-activate hot (accelerator) key (with or without "hide") of a control, needs use "Disable" ( Enable := .F. ) or "Release" method.
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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar »

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.
Do not think it's wrong, I think this is related to the need of each, sometimes used and sometimes not !.

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

User avatar
srvet_claudio
Posts: 2113
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 48 times
Been thanked: 224 times
Contact:

Post by srvet_claudio »

esgici wrote:
danielmaximiliano wrote: I think in VFP to create a Control it has the property HOTKEY , this to hide that property goes down.
IMO: "Hidden" not means "not exist"; although control is invisible, hot key should be active. So, this behavior of VFP isn't correct.

For des-activate hot (accelerator) key (with or without "hide") of a control, needs use "Disable" ( Enable := .F. ) or "Release" method.

Viva HMG :D
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.

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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
andyglezl
Posts: 1251
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 39 times
Been thanked: 107 times
Contact:

Post by andyglezl »

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... :oops:
----------------------------------------------------
Sorry, just saw the post from Dr. Soto ... :oops:
Andrés González López
Desde Guadalajara, Jalisco. México.

Post Reply