Problema onlostfocus/onenter
Moderator: Rathinagiri
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Problema onlostfocus/onenter
Hola estimados,
Tengo un combobox al cual le asigné la función validar() al evento onLostFocus.
Resulta que al presionar Enter, no ejecuta el evento onLostfocus, ese es el comportamiento correcto?.
Saludos cordiales,
Luis Vasquez
Uso : HMG.3.4.3
SisOp: Windows 10
Hello dears,
I have a combobox which I assigned the function validate () to the onLostFocus event.
It turns out that pressing Enter does not run the onLostfocus event, is that the correct behavior ?.
Best regards,
Luis Vasquez
Tengo un combobox al cual le asigné la función validar() al evento onLostFocus.
Resulta que al presionar Enter, no ejecuta el evento onLostfocus, ese es el comportamiento correcto?.
Saludos cordiales,
Luis Vasquez
Uso : HMG.3.4.3
SisOp: Windows 10
Hello dears,
I have a combobox which I assigned the function validate () to the onLostFocus event.
It turns out that pressing Enter does not run the onLostfocus event, is that the correct behavior ?.
Best regards,
Luis Vasquez
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: Problema onlostfocus/onenter
Try ON CHANGE
Re: Problema onlostfocus/onenter
OnChange is called everytime when you select any option or enter character
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Problema onlostfocus/onenter
Hi Luis,
ENTER will not cause losting event in the own component but you can use ON ENTER event at ComboBox adding your own procedure to reforces Validar().
Also you can test with SET NAVIGATION EXTENDED in case user love the ENTER key...
ENTER will not cause losting event in the own component but you can use ON ENTER event at ComboBox adding your own procedure to reforces Validar().
Also you can test with SET NAVIGATION EXTENDED in case user love the ENTER 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
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Problema onlostfocus/onenter
Sorry, my indication is not appropriated.
Please consider ON CHANGE as correct and been indicated by colleagues.
Please consider ON CHANGE as correct and been indicated by colleagues.
Last edited by Pablo César on Mon Apr 24, 2017 3:53 pm, edited 1 time in total.
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
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Problema onlostfocus/onenter
Can you please send a small sample?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
- Posts: 682
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Problema onlostfocus/onenter
Hi Luis
Try ON CLOSEUP instead ON LOSTFOCUS, this must work like you want
Cordialmente
Eduardo
Hola Luis
Prueba ON CLOSEUP en lugar de ON LOSTFOCUS, esto tendría que funcionar como deseas.
With regards
Eduardo
Try ON CLOSEUP instead ON LOSTFOCUS, this must work like you want
Cordialmente
Eduardo
Hola Luis
Prueba ON CLOSEUP en lugar de ON LOSTFOCUS, esto tendría que funcionar como deseas.
With regards
Eduardo
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Problema onlostfocus/onenter
Thanks for your help, I will send a sample today or tomorrow.
best regards,
Luis Vasquez.
best regards,
Luis Vasquez.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Problema onlostfocus/onenter
For me, this sample works fine.
Code: Select all
#include <hmg.ch>
Function Main
set navigation extended
define window main at 0, 0 width 400 height 300 main
define label text1label
row 10
col 10
width 100
value 'Text1'
end label
define textbox t1
row 10
col 110
width 200
value 'Some text'
end textbox
define label combo1label
row 40
col 10
width 100
value 'Combo1'
end label
define combobox c1
row 40
col 110
width 200
items { 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' }
value 1
onlostfocus c1focuslost()
end combobox
define label text2label
row 70
col 10
width 100
value 'Text2'
end label
define textbox t2
row 70
col 110
width 200
value 'Some text'
end textbox
end window
main.center
main.activate
Return
function c1focuslost
msginfo( 'Here' )
return nil
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: Problema onlostfocus/onenter
Without your sample we need to guess what, maybe this
p.s. not so good example, it's slow but work
p.s. not so good example, it's slow but work
- Attachments
-
- onchange.zip
- (1001.59 KiB) Downloaded 170 times