TGet bug? Picture of date.
Posted: Mon Feb 24, 2020 8:24 am
I have a test about picture of date, code is:
and set lTest := .F.
image:
Why picture about '.' and font is small ?
.res is:
Code: Select all
func Test()
Local oDlg, oGet[2], oBtn, oFnt
Local cPass := Space(10),;
cDate := Space(8),;
lTest := .T.
//
If lTest
DEFINE FONT oFnt NAME '細明體' SIZE 0, -12
EndIf
//
DEFINE DIALOG oDlg RESOURCE "TEST"
If lTest
oDlg:SetFont( oFnt )
EndIf
//
REDEFINE GET oGet[1] VAR cDate ID 201 OF oDlg;
PICTURE '@R 999.99.99'
REDEFINE GET oGet[2] VAR cPass ID 202 OF oDlg
//
REDEFINE BUTTON oBtn ID 101 OF oDlg ACTION oDlg:End()
REDEFINE BUTTON oBtn ID 102 OF oDlg ACTION oDlg:End()
//
ACTIVATE DIALOG oDlg;
ON INIT (WndCenter(oDlg:hWnd), msginfo( oDlg:oFont:cFaceName))
//
If lTest
oFnt:End()
EndIf
//
return nil
and set lTest := .F.
image:
Why picture about '.' and font is small ?
.res is:
Code: Select all
TEST DIALOG 52, 47, 111, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "DATE PICTURE 檢查"
FONT 12, "細明體"
{
CONTROL "", -1, "STATIC", SS_ETCHEDFRAME | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 8, 89, 29
CONTROL "DATE:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 30, 12, 19, 10
CONTROL "PASSWORD:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 14, 25, 36, 10
CONTROL "1234567890", 201, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 52, 10, 46, 12
CONTROL "1234567890", 202, "EDIT", ES_LEFT | ES_PASSWORD | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 52, 23, 46, 12
CONTROL "[&Y]確認", 101, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 16, 52, 40, 20
CONTROL "[&X]離開", 102, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 56, 52, 40, 20
}