Page 2 of 2

Hide/Show Control accelerator key

Posted: Tue Mar 24, 2015 1:30 pm
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.

Re: Hide/Show Control accelerator key

Posted: Tue Mar 24, 2015 4:17 pm
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

Re: Hide/Show Control accelerator key

Posted: Tue Mar 24, 2015 5:02 pm
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.

Re: Hide/Show Control accelerator key

Posted: Tue Mar 24, 2015 5:45 pm
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: