Hola :
Tengo un problema con el foco de un control textbox .
Les adjunto un ejemplo para que vean el problema .
El problema es que si bien el sistema me devuelve el foco al textbox pero solo al ingresar me deja ingresar numeros luego no , tengo que pintar el textbox para poder ingresar numeros .
Si retiro INSERT_CTRL_END() se soluciona pero no puedo aprovechar toda la altura del control browse .
Desde ya muchas gracias por su ayuda .
Saludos
Mario Mansilla
Hi
I have a problem with the focus of a textbox control.
I attached an example so you can see the problem.
The problem is that while the system returns the focus to my textbox but only lets me enter when entering numbers then no, I have to paint the textbox to enter numbers.
If I remove INSERT_CTRL_END () is solved but I can not take the full height browse control.
From already thank you very much for your help.
regards
Mario Mansilla
TextBox (Setfocus)
Moderator: Rathinagiri
-
- Posts: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
TextBox (Setfocus)
- Attachments
-
- TextBox2.rar
- (790.96 KiB) Downloaded 377 times
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: TextBox (Setfocus)
Hola Mario:
por alguna causa queda el Boton Aceptar con el Foco.
creo que la funcion "C" esta mal, nose cual es la necesidad de esa funcion.
interpreto que envias un varios eventos al Browse, pero nose cuales. ya que el primer evento es 0, solo envias VK_Control y nada mas.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
por alguna causa queda el Boton Aceptar con el Foco.
Code: Select all
HB_FUNC( INSERT_CTRL_END )
{
keybd_event
(
VK_CONTROL, // VK_CONTROL, 0x11 , CTRL key
0, // hardware scan code
0, // flags specifying various function options
0 // additional data associated with keystroke
);
keybd_event
(
VK_END, // virtual-key code
0, // hardware scan code
0, // flags specifying various function options
0 // additional data associated with keystroke
);
keybd_event
(
VK_CONTROL, // virtual-key code
0, // hardware scan code
KEYEVENTF_KEYUP, // flags specifying various function options
0 // additional data associated with keystroke
);
}
interpreto que envias un varios eventos al Browse, pero nose cuales. ya que el primer evento es 0, solo envias VK_Control y nada mas.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. 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: 269
- Joined: Wed Aug 13, 2008 2:35 pm
- Location: Córdoba - Argentina
Re: TextBox (Setfocus)
Hola Daniel :
La función INSERT_CTRL_END() la proporcionó Grigory y el objeto de la misma es aprovechar la totalidad del alto del browse , ya que de lo contrario al ingresar un nuevo elemento se posiciona a la mitad .
Si quito esa funcion el foco vuelve correctamente al textbox y me permite ingresar valores . Con la funcion el foco vuelve al textbox por eso se pinta de amarillo pero no me permite ingresar valores .
Saludos.
Mario
La función INSERT_CTRL_END() la proporcionó Grigory y el objeto de la misma es aprovechar la totalidad del alto del browse , ya que de lo contrario al ingresar un nuevo elemento se posiciona a la mitad .
Si quito esa funcion el foco vuelve correctamente al textbox y me permite ingresar valores . Con la funcion el foco vuelve al textbox por eso se pinta de amarillo pero no me permite ingresar valores .
Saludos.
Mario
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
TextBox (Setfocus)
Hola Mario,
Disculpame que solo haya respondido ahora tu mensaje. Espero que hayas solucionado tu problema. Caso todavia esté deficiente, te dejo mi indicacion:
En tu TEXTBOX Text_1 (creo que vos lo tenés en fmg), puedes adicionar:
ONGOTFOCUS (This.Backcolor := {255,255,0},_PushKey( VK_HOME ))
Espero que te pueda servir.
Hi Mario,
Sorry to reply you now only your message. I hope you have solved your problem. Case is still in bad function, I leave my indication:
In your TEXTBOX text_1 (I think you have in fmg file), you can add:
OnGotFocus ( THIS.BackColor: = {255,255,0} _PushKey (VK_HOME))
I hope I can serve.
Disculpame que solo haya respondido ahora tu mensaje. Espero que hayas solucionado tu problema. Caso todavia esté deficiente, te dejo mi indicacion:
En tu TEXTBOX Text_1 (creo que vos lo tenés en fmg), puedes adicionar:
ONGOTFOCUS (This.Backcolor := {255,255,0},_PushKey( VK_HOME ))
Espero que te pueda servir.
Hi Mario,
Sorry to reply you now only your message. I hope you have solved your problem. Case is still in bad function, I leave my indication:
In your TEXTBOX text_1 (I think you have in fmg file), you can add:
OnGotFocus ( THIS.BackColor: = {255,255,0} _PushKey (VK_HOME))
I hope I can serve.
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
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: TextBox (Setfocus)
Hola Pablo César,
Bien!
Saludos
Bien!
Saludos