From: Rodrigo M. <rod...@te...> - 2004-04-20 14:38:38
|
Hi all, 1) In this sample, the first get is not validating the VALID clause when enter key is pressed. Function Test() Local oGet1, oGet2, oGet3, oBtn Local xGet1 := 10 Local xGet2 := Date() Local xGet3 := Space(20) PREPARE FONT oFont NAME "Courier New" WIDTH 0 HEIGHT -11 INIT DIALOG oForm CLIPPER NOEXIT TITLE "HEdit Test"; FONT oFont ; AT 0, 0 SIZE 700, 425 ; STYLE DS_CENTER + WS_VISIBLE + WS_POPUP + WS_VISIBLE + WS_CAPTION + WS_SYSMENU @ 10, 10 GET oGet1 VAR xGet1 SIZE 100,25 VALID {|| oBtn:setfocus(), .t. } @ 10, 40 GET oGet2 VAR xGet2 SIZE 100,25 STYLE WS_DISABLED @ 10, 70 GET oGet3 VAR xGet3 SIZE 100,25 STYLE WS_DISABLED @ 620, 395 BUTTON oBtn CAPTION 'Close' ID 5001 SIZE 75,25 ON CLICK {|| oForm:close() } STYLE WS_TABSTOP ACTIVATE DIALOG oForm Return Nil 2) Next code, the focus behaviour on BUTTON is weard, button is focused but ENTER key not work only works if i press SPACE key. @ 10, 10 GET oGet1 VAR xGet1 SIZE 100,25 @ 10, 40 GET oGet2 VAR xGet2 SIZE 100,25 @ 10, 70 GET oGet3 VAR xGet3 SIZE 100,25 VALID {|| oBtn:setfocus(), .t. } @ 620, 395 BUTTON oBtn CAPTION 'Close' ID 5001 SIZE 75,25 ON CLICK {|| oForm:close() } STYLE WS_TABSTOP Regards Rodrigo |