setting font on Group Box

setting font on Group Box

Postby fraxzi » 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? :shock:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Sat May 24, 2008 9:06 am

Frances,

Here you have a working sample that is working fine here:

test.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oFont
   
   DEFINE FONT oFont NAME "Verdana" SIZE 0, -12

   DEFINE DIALOG oDlg RESOURCE "test"

   REDEFINE GROUP oGrp ID 100 OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oGrp:SetFont( oFont )

   oFont:End()

return nil


test.rc
Code: Select all  Expand view
1 24 "WindowsXP.Manifest"

test DIALOG 17, 36, 120, 116
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
GROUPBOX "Group", 100, 9, 6, 103, 79, BS_GROUPBOX
DEFPUSHBUTTON "OK", 1, 62, 93, 50, 14
}


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Sat May 24, 2008 2:42 pm

Thank you so much for your reply!


It is very clear in your code that dialog and group object from .rc are working pretty well....

But the issue is when you define folder with tab...or tabs... with define dialog and group object... that the font set to group is not possible ..? :? ? but using the font of folder wherein defined as bigger than it's child dialog with group object... thus making the group looks funny.... with xp manifest in the rc.

..but without xp manifest, the group object's font is showing correctly.



Please see the above code again.


regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Sat May 24, 2008 11:18 pm

Frances,

Please try the call to oGroup:SetFont( oDlgFont ) from the ON INIT clause of your main dialog:

ACTIVATE DIALOG oDlg ON INIT oGroup:SetFont( oDlgFont )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Mon May 26, 2008 12:26 am

Mr. Antonio,


Unfortunately same thing happened. Groupboxes fonts cannot be set under dialog of folder:adialogs[1] with defined xp manifest in .RC

Maybe really a bug in group class... ? :? ?



Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Mon May 26, 2008 12:03 pm

Frances,

We have reviewing the Class TGroup and it does not seem as a bug inside it as it does not paint the text at all.

It looks as a side effect of the use of themes and the use of a folder.

We keep doing tests to see if we can find a workaround for it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Tue May 27, 2008 3:17 am

Thank you so much for the immediate attention :D


Looking forward for the workaround...



Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby fraxzi » Tue Jun 10, 2008 4:03 pm

Mr. Antonio,

The effect of themes + folder font + group box font is really an issue for me.

I cant find any solution with app on themed with folder font and groupbox font mix together...

oGroup:oFont.. is 'courier 10' but the display (under xp theme) oFolder's font ... 'times 22'

This is not only confusing.. :(


Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Maurizio » Wed Sep 17, 2008 2:58 pm

Antonio

Have you found a solution about this problem ?

Grazie MAurizio
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm

FWH 8.11 problem with GROUPBOX within FOLDER

Postby fraxzi » Sat Nov 29, 2008 1:03 am

This is still an issue with FWH 8.11

If the groupbox has caption...

Image

a painful workaround is to define SAY object and put on top of groupbox (without caption) :cry: :cry: :cry: :cry:


any solution yet?

Regards
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Sat Nov 29, 2008 8:08 am

Frances,

Each page of a folder contains a dialog that may be getting its font from its container (the folder), and the groupbox may be using the same font by default.

Have you tried to change the groupbox font ? oGroup:SetFont( oFont )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Sat Nov 29, 2008 8:18 am

Yes. I assigned diff font to groupbox, say and get objects with expected results. Only that icon of folder affects the groupboxes (themed)..


I tried oGroup:SetFont( oFont ) on dialog init and other workarounds but to no avail.

this mystery does not exist on NON-THEMED apps... It should be solved by FWH8.11 :P :P :P :P


Please help for this is not convenient programming...


Regards
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Sat Nov 29, 2008 8:21 am

Lets build a small example to reproduce it...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sat Nov 29, 2008 8:24 am

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oFld, oGrp
   
   DEFINE DIALOG oDlg SIZE 400, 300

   @ 0.5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ;
      PROMPTS "One", "Two", "Three"
     
   @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld:aDialogs[ 1 ]
     
   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sat Nov 29, 2008 8:26 am

Setting a font. Is this what you mean ? :-)
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oFnt, oDlg, oFld, oGrp
   
   DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD
   
   DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt

   @ 0.5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ;
      PROMPTS "One", "Two", "Three"
     
   @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld:aDialogs[ 1 ]
     
   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests