Hello,
I want to show in a Preview-dialog ( from Code ) Buttons => Class BTNBMP
with defined Sizes from inside another Dialog ( from Resources ).
The Preview shows the Buttons nearly Factor * 2
Painter ( from Resource ) Button defined 100 x 50
...
...
REDEFINE BTNBMP oBtn1 ID 500 OF oWndBtnB 2007 ;
FILENAME c_path + "\Bitmaps\32Exit.bmp" ;
LEFT ;
PROMPT " &Exit" ;
FONT oTextFont ;
ACTION ( oWndBtnB:End() )
oBtn1:cTooltip := "Test-Button"
oBtn1:lTransparent := .F.
oBtn1:l2007 := .T.
oBtn1:SetColor( nTColor5 )
...
...
oBtn1:SetSize( 100, nBtnHight5, .T. )
Preview ( from Code )
..
..
DEFINE DIALOG oDlg8 FROM 100, 200 TO 600, 900 OF oWnd7 PIXEL TRANSPARENT ;
..
..
@ 40, 20 BTNBMP oBtn[1] OF oDlg8 PIXEL ;
SIZE 100 , nBtnHight5 PROMPT "Test-Button &1" ;
FONT oTextFont ;
TOP ;
NOBORDER ;
FILENAME cBmpName1 ;
ACTION MsgAlert( "100 x " + ALLTRIM(STR(nBtnHight5)), "Size Button 1" )
It looks like a Factor of 2 :
Using a FWH-sample shows, the defined Buttonsize is not related to Dialog-size :
The middle Button ( the Hight must be 80 to 300 but is shown double-size )
@ 10, 75 BTNBMP oBtn OF oWnd ;
SIZE 100, 80 ;
PROMPT "&" + cVer FILE "..\BITMAPS\sms.bmp" 2007 ;
FONT oFont BOTTOM ;
ACTION MsgInfo( "Yes" )
With Buttonbars it works
The Preview shows exactly the Hight, defined with the Painter
I changed from Code to Resource to get a identical Result :
with oBtn1:SetSize( 180, nBtnHight5, .T. )
Best regards
Uwe