In samples testfld4.prg from FWH I changed FONT in the rc-file everywhere to size 14.
But the dialogs still shown in a small font.
I tried:
AEVAL( oFolder:aDialogs, {|x| x:oFont := oFont} )
Then the label are shown in the fond of the folder but the controls like oGet are still in a small font.
How can I manage that all controls and label are shown in the same size and font as the folder?
Thanks in advance
Otto
Folder & Font
Natter, I mean the font I use in the resource file.
I tried your solution but I had to define a font.
Regards,
Otto
DLGTEST DIALOG 6, 15, 244, 155
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog de prueba - posibles bugs"
FONT 12, "MS Sans Serif"
{
LTEXT "Código :", -1, 9, 4, 38, 12
EDITTEXT 101, 41, 3, 52, 12
CONTROL FOLDER32, 102, FOLDER32, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 21, 236, 108
PUSHBUTTON "&Aceptar", 201, 153, 135, 40, 14
PUSHBUTTON "&Cancelar", 202, 197, 135, 40, 14
}
I tried your solution but I had to define a font.
Regards,
Otto
#include "fivewin.ch"
PROCEDURE main()
LOCAL oDlg, oFolder, font1
LOCAL cContrato:=space(13) ,;
cNombre:=space(30) ,;
cDireccion:=space(60) ,;
cTelefono:=space(10) ,;
cNotas:=""
DEFINE FONT font1 NAME "ARIAL" SIZE 0,-10 BOLD
//Define dialogo
DEFINE DIALOG oDlg NAME "DLGTEST";
TITLE "Another folder test"
//Redefine controles
REDEFINE GET cContrato;
ID 101 OF oDlg;
PICTURE "@!" ;
VALID !empty(cContrato)
//Redefine controles del dialogo
REDEFINE FOLDER oFolder ;
ID 102 ;
OF oDlg ;
PROMPTS "Pagina &1","Pagina &2" ;
DIALOGS "DlgPage1", "DlgPage2"
oDlg:SetFont(Font1)
AEVAL( oFolder:aDialogs, {|x| x:oFont := Font1} )
oFolder:SetFont(Font1)
oFolder:oFont2:=Font1
// oFolder:lWin95Look:=.f.
//Redefine controles del 1er. page
*=======================================================================
REDEFINE GET cNombre;
ID 101 OF oFolder:aDialogs[1];
PICTURE "@!" ;
VALID !empty(cNombre)
REDEFINE GET cDireccion;
ID 102 OF oFolder:aDialogs[1];
PICTURE "@!";
VALID !empty(cDireccion)
REDEFINE GET cTelefono;
ID 103 OF oFolder:aDialogs[1]
REDEFINE BTNBMP ;
ID 104 OF oFolder:aDialogs[1];
NAME "CANCELAR";
ACTION ( MsgDate() )
//Redefine controles del 2do. page
*=======================================================================
REDEFINE GET cNotas;
ID 101 OF oFolder:aDialogs[2];
MEMO
*=======================================================================
REDEFINE BUTTON;
ID 201 OF oDlg
REDEFINE BUTTON;
ID 202 OF oDlg;
ACTION oDlg:end() CANCEL
//Activar dialogo
ACTIVATE DIALOG oDlg CENTER ON INIT msginfo(oDlg:SetFont(Font1))
RETURN
procedure AppSys // Xbase++ requirement
return
Thank you Natter,
Now I have the font in the My_Init function.
But how do I repaint/refresh all the controls?
Would you be so kind to help me on that, too?
Thanks in advance
Otto
procedure My_Init(oDlg,oFolder)
local fnt
local aPrompts :={"test1","test2"}
fnt := oDlg:GetFont()
msginfo(fnt:cFaceName())
//oDlg:SetFont(fnt)
//AEVAL( oFolder:aDialogs, {|x| x:oFont := fnt} )
//oFolder:SetFont(fnt)
//oFolder:oFont2 := fnt
return
Now I have the font in the My_Init function.
But how do I repaint/refresh all the controls?
Would you be so kind to help me on that, too?
Thanks in advance
Otto
procedure My_Init(oDlg,oFolder)
local fnt
local aPrompts :={"test1","test2"}
fnt := oDlg:GetFont()
msginfo(fnt:cFaceName())
//oDlg:SetFont(fnt)
//AEVAL( oFolder:aDialogs, {|x| x:oFont := fnt} )
//oFolder:SetFont(fnt)
//oFolder:oFont2 := fnt
return