On Change en control Textbox

Moderator: Rathinagiri

Post Reply
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

On Change en control Textbox

Post by Mario Mansilla »

Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
Attachments
Test.rar
(8.6 KiB) Downloaded 194 times
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: On Change en control Textbox

Post by Roberto Lopez »

Mario Mansilla wrote:Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
This is a known bug.

I've solved but it had a nasty side effect, so I've retired the fix until another new solution arises.

Maybe Grigory had solved.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: On Change en control Textbox

Post by gfilatov »

Roberto Lopez wrote:
Mario Mansilla wrote:Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
This is a known bug.

I've solved but it had a nasty side effect, so I've retired the fix until another new solution arises.

Maybe Grigory had solved.
Hi Mario,

Roberto are right: your sample works properly in Minigui Extended (just tested 8-) ).
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: On Change en control Textbox

Post by Mario Mansilla »

Ok Gracias , Roberto y Grigory

Mario Mansilla
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: On Change en control Textbox

Post by danielmaximiliano »

Hola a todos:
anoche me quede estancado en algo muy simple , no puedo ver donde esta mi equivocacion
un simple diseño de formulario conteniendo un TextBox y un Label.
intento usar ON ENTER asi validar el TextBox en un procedimiento y carga el contenido en un Label, pero no pude
dejo el codigo para que lo vean y la imagen con el error que me tira al ejecutar dicho codigo.

Code: Select all

	#include 'hmg.ch'

Function Main
        
    DEFINE WINDOW main;
      AT 138 , 235 ;
	  WIDTH 550 HEIGHT 350;
      TITLE "Test TextBox Numeric " ;
      MAIN 
      
   DEFINE TEXTBOX Text_1
        ROW    60
        COL    270
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Valida()
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        DISABLEDBACKCOLOR Nil
        DISABLEDFONTCOLOR Nil
        CASECONVERT NONE
        BACKCOLOR Nil
        FONTCOLOR Nil
        INPUTMASK Nil
        FORMAT Nil
        NUMERIC .T. 
        VALUE 0
    END TEXTBOX
     
 
    @ 130, 120 LABEL Label_1;
        VALUE "Value TextBox :="
        

    END WINDOW

    Main.Activate

Return

 Procedure Valida()
  main.Label_1.value:= main.Label_1.value + str(Text_1 , 4)
  main.Text_1.setfocus
 return
EMain.png
EMain.png (46.9 KiB) Viewed 3238 times
será mucho el sueño y no veo el error, gracias por su ayuda.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: On Change en control Textbox

Post by Ricci »

Objects are LOCAL in HMG4, so

ONENTER Valida( main )

and

Procedure Valida( main )

should help.
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: On Change en control Textbox

Post by danielmaximiliano »

HI Ricci:
sorry, I forgot to mention that is HMG.3.0.39
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: On Change en control Textbox

Post by danielmaximiliano »

HI :

Sr. Ratinagiri, ud puede borrar mis post y el de Ricci.
ya solucione el problema.
es una tonteria mi pregunta al foro.
queria trabajar sobre una variable y con el sueño que tenia no vi que estaba mal.
era sencillamente

Code: Select all

STR(main.text_1.value,4)
pido disculpas por el tiempo de leer mi post


Mr. Ratinagiri, you can delete my post and that of Ricci.
and fix the problem.
my question is silly to the forum.
wanted to work on a variable and had the dream that I saw was wrong.
was simply

Code: Select all

STR(main.text_1.value,4)
I apologize for the time to read my post
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply