setting font on Group Box
Posted: Sat May 24, 2008 2:10 am
I observed that in .rc has [1 24 "WindowsXP.Manifest" ]
the font set in oFolder:SetFont( oFont ) is inherited by oGroup and direspecting oGroup:Setfont( oNewFont )
sample .rc
1 24 "WindowsXP.Manifest"
INFOFLD DIALOG 1, 1, 200, 200
STYLE WS_CHILD
FONT 10, "Courier"
{
CONTROL "", 103, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 1, 1, 198, 198
}
INFODLG DIALOG 1, 1, 597, 468
STYLE WS_CHILD
FONT 10, "Courier"
{
GROUPBOX "&Group", 130, 8, 10, 431, 74, BS_GROUPBOX | BS_LEFTTEXT | WS_GROUP
}
....
sample .prg
....
DEFINE DIALOG oDlg RESOURCE "INFOFLD"
....
REDEFINE FOLDER oFolder ID 103 OF oDlg;
PROMPT "INFO";
DIALOGS "INFODLG"
oFolder:SetFont( oFont ) //big font for folder title
REDEFINE GROUP;
ID 130 OF oFolder:aDialogs[ 1 ];
FONT oDlgFont TRANSPARENT //just courier 10
.....BUT..... the font of group box is font of oFolder!?? I even set it like this...
REDEFINE GROUP oGroup;
ID 130 OF oFolder:aDialogs[ 1 ];
FONT oDlgFont TRANSPARENT //just courier 10
oGroup:SetFont( oDlgFont ) // but still font of oFolder....
but if i remove [ 1 24 "WindowsXP.Manifest" ] in .RC the groupbox is now controllable... font can be set accordingly.
BUG?
the font set in oFolder:SetFont( oFont ) is inherited by oGroup and direspecting oGroup:Setfont( oNewFont )
sample .rc
1 24 "WindowsXP.Manifest"
INFOFLD DIALOG 1, 1, 200, 200
STYLE WS_CHILD
FONT 10, "Courier"
{
CONTROL "", 103, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 1, 1, 198, 198
}
INFODLG DIALOG 1, 1, 597, 468
STYLE WS_CHILD
FONT 10, "Courier"
{
GROUPBOX "&Group", 130, 8, 10, 431, 74, BS_GROUPBOX | BS_LEFTTEXT | WS_GROUP
}
....
sample .prg
....
DEFINE DIALOG oDlg RESOURCE "INFOFLD"
....
REDEFINE FOLDER oFolder ID 103 OF oDlg;
PROMPT "INFO";
DIALOGS "INFODLG"
oFolder:SetFont( oFont ) //big font for folder title
REDEFINE GROUP;
ID 130 OF oFolder:aDialogs[ 1 ];
FONT oDlgFont TRANSPARENT //just courier 10
.....BUT..... the font of group box is font of oFolder!?? I even set it like this...
REDEFINE GROUP oGroup;
ID 130 OF oFolder:aDialogs[ 1 ];
FONT oDlgFont TRANSPARENT //just courier 10
oGroup:SetFont( oDlgFont ) // but still font of oFolder....
but if i remove [ 1 24 "WindowsXP.Manifest" ] in .RC the groupbox is now controllable... font can be set accordingly.
BUG?