it give me a bad number and then not insert it on get
the test
- Code: Select all Expand view
- #include "fivewin.ch"
#include "constant.ch"
Function Test()
Local oDlg,oFont,oBold
Local ObtnSel[10]
Local cFont:=""
Local nSizeFont:=0
Local nBottom := 22
Local nRight := 102
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
local aGet[20]
local oSay[10]
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD
DEFINE DIALOG oDlg ;
TITLE "test sel font" ;
SIZE nWidth, nHeight PIXEL FONT oFont ;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 ) ;
COLOR CLR_BLACK, nRgb( 245,244,234)
@ 116, 5 SAY oSay[6] Prompt "Carattere" SIZE 80,14 PIXEL OF oDlg TRANSPARENT FONT oBold
@ 126, 5 GET aGet[14] VAR cFont SIZE 200,12 PIXEL OF oDlg
@ 126, 208 GET aGet[15] VAR nSizeFont SIZE 18,12 PIXEL OF oDlg
@ 126, 228 BTNBMP oBtnSel[4] RESOURCE "font.bmp" FLAT SIZE 14, 12 OF oDlg PIXEL ;
COLOR nRgb(238,236,219),nRgb(238,236,219) BORDER;
ACTION (aFont:=ChooseFont(),;
cFont :=aFont[LF_FACENAME],;
nSizeFont:= aFont[LF_HEIGHT ],;
msginfo( nSizeFont),;
aGet[14]:refresh(),aGet[15]:refresh())
ACTIVATE DIALOG oDLG CENTER
RETURN NIL