Odd Behaviour
Moderator: Rathinagiri
-
- Posts: 16
- Joined: Fri Apr 05, 2013 8:45 am
- DBs Used: DBF, ACCDB
- Location: 25Km South of London
- Contact:
Odd Behaviour
Hi All
I am a retired software engineer in England and have been programming in Clipper since about 1988 and more recently with MS-Access / MS-SQL but have only just started with HMG v3.1.0 and IDE of 24.6.2011 under Windows 7 Professional with all updates. Can anyone please advise me why I get problems with the following code? It always compiles and runs but as shown I cannot move the focus to another textbox using a left mouse click - the Tab key always moves the focus correctly. If I comment out the first block of four text boxes, remove the comments from the second set and recompile, it works correctly with the mouse and Tab key. The only difference being the position of the text boxes.
Regards
Bob
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0, 0;
WIDTH 600 ;
HEIGHT 300 ;
TITLE 'HMG Menu Test' ;
MAIN
@ 40, 10 label label_1 value "Str1"
@ 80, 10 label label_2 value "Str2"
@ 120, 10 label label_3 value "Str3"
@ 160, 10 label label_4 value "Str4"
@ 40, 80 TEXTBOX TEXT_1
@ 80, 80 TEXTBOX TEXT_2
@ 120, 80 TEXTBOX TEXT_3
@ 160, 80 textbox text_4
// @ 40, 200 TEXTBOX TEXT_1
// @ 80, 200 TEXTBOX TEXT_2
// @ 120, 200 TEXTBOX TEXT_3
// @ 160, 200 textbox text_4
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return
I am a retired software engineer in England and have been programming in Clipper since about 1988 and more recently with MS-Access / MS-SQL but have only just started with HMG v3.1.0 and IDE of 24.6.2011 under Windows 7 Professional with all updates. Can anyone please advise me why I get problems with the following code? It always compiles and runs but as shown I cannot move the focus to another textbox using a left mouse click - the Tab key always moves the focus correctly. If I comment out the first block of four text boxes, remove the comments from the second set and recompile, it works correctly with the mouse and Tab key. The only difference being the position of the text boxes.
Regards
Bob
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0, 0;
WIDTH 600 ;
HEIGHT 300 ;
TITLE 'HMG Menu Test' ;
MAIN
@ 40, 10 label label_1 value "Str1"
@ 80, 10 label label_2 value "Str2"
@ 120, 10 label label_3 value "Str3"
@ 160, 10 label label_4 value "Str4"
@ 40, 80 TEXTBOX TEXT_1
@ 80, 80 TEXTBOX TEXT_2
@ 120, 80 TEXTBOX TEXT_3
@ 160, 80 textbox text_4
// @ 40, 200 TEXTBOX TEXT_1
// @ 80, 200 TEXTBOX TEXT_2
// @ 120, 200 TEXTBOX TEXT_3
// @ 160, 200 textbox text_4
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return
Re: Odd Behaviour
Hi BobFBurns,
it's because of the long width of the labels. try this one.
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0, 0;
WIDTH 600 ;
HEIGHT 300 ;
TITLE 'HMG Menu Test' ;
MAIN
@ 40, 10 label label_1 value "Str1" width 40
@ 80, 10 label label_2 value "Str2" width 40
@ 120, 10 label label_3 value "Str3" width 40
@ 160, 10 label label_4 value "Str4" width 40
@ 40, 80 TEXTBOX TEXT_1
@ 80, 80 TEXTBOX TEXT_2
@ 120, 80 TEXTBOX TEXT_3
@ 160, 80 textbox text_4
// @ 40, 200 TEXTBOX TEXT_1
// @ 80, 200 TEXTBOX TEXT_2
// @ 120, 200 TEXTBOX TEXT_3
// @ 160, 200 textbox text_4
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return
it's because of the long width of the labels. try this one.
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0, 0;
WIDTH 600 ;
HEIGHT 300 ;
TITLE 'HMG Menu Test' ;
MAIN
@ 40, 10 label label_1 value "Str1" width 40
@ 80, 10 label label_2 value "Str2" width 40
@ 120, 10 label label_3 value "Str3" width 40
@ 160, 10 label label_4 value "Str4" width 40
@ 40, 80 TEXTBOX TEXT_1
@ 80, 80 TEXTBOX TEXT_2
@ 120, 80 TEXTBOX TEXT_3
@ 160, 80 textbox text_4
// @ 40, 200 TEXTBOX TEXT_1
// @ 80, 200 TEXTBOX TEXT_2
// @ 120, 200 TEXTBOX TEXT_3
// @ 160, 200 textbox text_4
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return
-
- Posts: 16
- Joined: Fri Apr 05, 2013 8:45 am
- DBs Used: DBF, ACCDB
- Location: 25Km South of London
- Contact:
Re: Odd Behaviour
Hi Jayesh
Thank you for your quick reply. I had not realised that the labels were so large. I will change the background colour to see if their full size can be made visible.
HMG is an excellent product.
Bob
Thank you for your quick reply. I had not realised that the labels were so large. I will change the background colour to see if their full size can be made visible.
HMG is an excellent product.
Bob
-
- Posts: 388
- Joined: Wed Nov 21, 2012 7:14 pm
- Location: México
Re: Odd Behaviour
Hola Bob...
Lo que pasa es que la longitud de los Labels ocupa parte de los Textbox y es por eso que el Mouse del raton no funciona, debes de reducir el tamaño de los Labels con WIDTH , aunque no se vea esta ocupando espacios en blanco.... O aleja un poco más los TextBox.
Saludos
Polo
*--------------------------------------------------------------------------------------------------------------------------------------------------
Hi Bob ...
What happens is that the length of the Labels occupies part of the Textbox and that is why the Mouse mouse does not work, you must reduce the size of Labels with WIDTH, and not see this occupying spaces ... . Or moves further away the TextBox.
regards
Polo
Lo que pasa es que la longitud de los Labels ocupa parte de los Textbox y es por eso que el Mouse del raton no funciona, debes de reducir el tamaño de los Labels con WIDTH , aunque no se vea esta ocupando espacios en blanco.... O aleja un poco más los TextBox.
Saludos
Polo
*--------------------------------------------------------------------------------------------------------------------------------------------------
Hi Bob ...
What happens is that the length of the Labels occupies part of the Textbox and that is why the Mouse mouse does not work, you must reduce the size of Labels with WIDTH, and not see this occupying spaces ... . Or moves further away the TextBox.
regards
Polo
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Odd Behaviour
Hello Bob
Welcome aboard
Salute to England from Turkiye
Happy HMG'ing
Welcome aboard
Salute to England from Turkiye
Happy HMG'ing
Viva INTERNATIONAL HMG
-
- Posts: 16
- Joined: Fri Apr 05, 2013 8:45 am
- DBs Used: DBF, ACCDB
- Location: 25Km South of London
- Contact:
Re: Odd Behaviour
Hi Polo
Thanks for your reply. I now understand the issue but it was not immediately obvious when the problem first occured and there is no mention in the help files.
Regards
Bob
Thanks for your reply. I now understand the issue but it was not immediately obvious when the problem first occured and there is no mention in the help files.
Regards
Bob
-
- Posts: 388
- Joined: Wed Nov 21, 2012 7:14 pm
- Location: México
Re: Odd Behaviour
Hola Bob...
No, muchas cosas las vamos aprendiendo a la medida que vamos conociendo a HMG, no hay de otra y creo que es una buena manera,... poco a poco se domina... yo todavía estoy en eso.. poco a poco.
Saludos
Polo
*----------------------------------------------------------------------------------------------------------------------------------------
Hi Bob ...
No, many things we learn as we go to HMG knowing, there is no choice and I think it's a good way ... gradually dominating ... I'm still at it .. slowly.
regards
Polo
No, muchas cosas las vamos aprendiendo a la medida que vamos conociendo a HMG, no hay de otra y creo que es una buena manera,... poco a poco se domina... yo todavía estoy en eso.. poco a poco.
Saludos
Polo
*----------------------------------------------------------------------------------------------------------------------------------------
Hi Bob ...
No, many things we learn as we go to HMG knowing, there is no choice and I think it's a good way ... gradually dominating ... I'm still at it .. slowly.
regards
Polo
- danielmaximiliano
- Posts: 2618
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Odd Behaviour
Hola BobFBurns :BobFBurns wrote:Hi Polo
Thanks for your reply. I now understand the issue but it was not immediately obvious when the problem first occured and there is no mention in the help files.
Regards
Bob
Si usted trabaja con Photoshop y superpone imagenes las misma no pueen ser seleccionadas porque la primera capta el movimiento del puntero.
esto no sucede cuando usted en su aplicacion utiliza
Code: Select all
Set Navigation Extended
se da porque el fondo del textbox es blanco con letras negras sobre un fondo blanco, no se toma en consideracion por nuestra vista/cerebro porque no distingue el verdadero tamaño del control.
esto no sucede si usted utiliza un fondo distinto al blanco ahi se da cuenta que el control tiene diferente proporciones y trata que esteticamente quede mejor.
Translate Google
If you work with Photoshop and superimposed images the same pueen not be selected because the first captures the movement of the pointer.
This does not happen when you use in your application and use
Code: Select all
Set Navigation Extended
is because the textbox is white background with black letters on a white background, is not taken into consideration by our eyes / brain does not distinguish the true size of the control.
this does not happen if you use a background other than white there realizes that the control has different proportions and it looks better aesthetically.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
-
- Posts: 16
- Joined: Fri Apr 05, 2013 8:45 am
- DBs Used: DBF, ACCDB
- Location: 25Km South of London
- Contact:
Re: Odd Behaviour
Thank you DaNiElMaXiMiLiAnO - I will try that out.
I would like to try asnd emulate the Clipper mechanism of moving between data entry fields using the cursor up/down keys and terminating data entry using Page Down if that is possible.
Regards
Bob
I would like to try asnd emulate the Clipper mechanism of moving between data entry fields using the cursor up/down keys and terminating data entry using Page Down if that is possible.
Regards
Bob
Re: Odd Behaviour
Hi, Bob, and welcome to the Forum.
(Even if you are English and I'm Scottish!!)
Or, if you set TabStops to .F. for all the input boxes, you'd be able to use Tab (as the equivalent of the PgDn key) to get to the option after the last data-input box - but then that would block the individual up/down key moves.
I don't have the answer, but hope that this might prompt either some inspiration or just something to investigate.
Regards,
CalScot
(Even if you are English and I'm Scottish!!)
I know exactly what you mean. You might want to look at the definitions in the object inspector for each data entry box, where you'll see something like Tab Stop (Value .T./.F.) You might want to look at redefining the up and down arrows (keys 5 and 19, if I remember correctly - or is it the other way around?) to emulate Back-Tab and Tab?moving between data entry fields using the cursor up/down keys and terminating data entry using Page Down
Or, if you set TabStops to .F. for all the input boxes, you'd be able to use Tab (as the equivalent of the PgDn key) to get to the option after the last data-input box - but then that would block the individual up/down key moves.
I don't have the answer, but hope that this might prompt either some inspiration or just something to investigate.
Regards,
CalScot