Page 1 of 1

On Change en control Textbox

Posted: Fri Oct 22, 2010 4:44 pm
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

Re: On Change en control Textbox

Posted: Fri Oct 22, 2010 4:48 pm
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.

Re: On Change en control Textbox

Posted: Fri Oct 22, 2010 6:45 pm
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-) ).

Re: On Change en control Textbox

Posted: Mon Oct 25, 2010 7:51 pm
by Mario Mansilla
Ok Gracias , Roberto y Grigory

Mario Mansilla

Re: On Change en control Textbox

Posted: Tue Oct 18, 2011 1:09 pm
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 3334 times
será mucho el sueño y no veo el error, gracias por su ayuda.

Re: On Change en control Textbox

Posted: Tue Oct 18, 2011 2:51 pm
by Ricci
Objects are LOCAL in HMG4, so

ONENTER Valida( main )

and

Procedure Valida( main )

should help.

Re: On Change en control Textbox

Posted: Tue Oct 18, 2011 4:13 pm
by danielmaximiliano
HI Ricci:
sorry, I forgot to mention that is HMG.3.0.39

Re: On Change en control Textbox

Posted: Tue Oct 18, 2011 5:39 pm
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