Odd Behaviour

Moderator: Rathinagiri

BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Odd Behaviour

Post by BobFBurns »

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
Jayesh
Posts: 36
Joined: Fri Apr 01, 2011 4:46 pm

Re: Odd Behaviour

Post by Jayesh »

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
BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Re: Odd Behaviour

Post by BobFBurns »

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
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: Odd Behaviour

Post by Leopoldo Blancas »

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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Odd Behaviour

Post by esgici »

Hello Bob

Welcome aboard :)

Salute to England from Turkiye :)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Re: Odd Behaviour

Post by BobFBurns »

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
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: Odd Behaviour

Post by Leopoldo Blancas »

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
User avatar
danielmaximiliano
Posts: 2607
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Odd Behaviour

Post by danielmaximiliano »

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
Hola BobFBurns :

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 
con la tecla ENTER r para pasar al proximo control o utiliza la tecla TAB.
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
and key ENTER to move to the next control or use the TAB key.
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
BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Re: Odd Behaviour

Post by BobFBurns »

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
User avatar
CalScot
Posts: 303
Joined: Thu Mar 21, 2013 12:22 am
Location: California

Re: Odd Behaviour

Post by CalScot »

Hi, Bob, and welcome to the Forum.
(Even if you are English and I'm Scottish!!)
moving between data entry fields using the cursor up/down keys and terminating data entry using Page Down
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?
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
Post Reply