I noticed a painting Problem using Groups on Dialog COLOR - brush.
Gradient, Bmp-Brush and Image works fine.
COLOR-brush only using Text
COLOR-brush with Text, Checkbox and Radio
GRADIENT-brush ( Color 1 and 2 are the same )
with Text, Checkbox and Radio
BMP-Brush :
Image-Brush
Using DIALOG without TRANSPARENT a closed frame is shown :
DEFINE DIALOG oDlg TITLE "TRANSPARENT Grouptest" ;
FROM 0,0 TO 350, 500 PIXEL // TRANSPARENT
A sample for testing :
- Code: Select all Expand view
#INCLUDE "FIVEWIN.CH"
FUNCTION MAIN()
local oDlg, oGrp, oFont, oGroup, Brush, hDC
local oCheck, lCheck := .T., oRadio, nOption := 1, oSay
local c_path := CURDRIVE() + ":\" + GETCURDIR()
local cDBrush := "Granite.Bmp"
local cDImage := "Fantasy2.Jpg"
DEFINE FONT oFont NAME "Arial" SIZE 0, -16
DEFINE DIALOG oDlg TITLE "TRANSPARENT Grouptest" ;
FROM 0,0 TO 350, 500 PIXEL TRANSPARENT
// COLOR shows a incomplete Group !!!
// --------------------------------------------
//DEFINE BRUSH oBrush COLOR 8404992
// GRADIENT-Brush
// -------------------
aGrad := { { 1, 8404992, 8404992 }, { 1, 8404992, 8404992 } }
hDC = CreateCompatibleDC( oDlg:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg:hDC, 878, 692 ) // Get Width and Height from INIT !!!
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, 692, 878, aGrad )
DeleteObject( oDlg:oBrush:hBrush )
oBrush := TBrush():New( ,,,, hBmp )
oBrush:Cargo := aGrad
SelectObject( hDC, hBmpOld )
ReleaseDC(hDC)
// BMP-BRUSH
// --------------
//DEFINE BRUSH oBrush FILE c_path + "\Images\" + cDBrush
// Image-Brush ADJUSTED
// ----------------------------
//DEFINE IMAGE oImage FILE c_path + "\Images\" + cDImage
//oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, 500, 350, .T. ) )
//oImage:End()
oDlg:Setbrush( oBrush )
@ 30, 40 GROUP oGroup TO 130, 210;
PROMPT "Transparent Group" ;
OF oDlg FONT oFont PIXEL
oGroup:SetColor( 65535, )
@ 50, 50 CHECKBOX oCheck VAR lCheck ;
PROMPT "&Check" SIZE 50, 12 OF oDlg PIXEL
oCheck:SetColor( 65535, )
oCheck:SetFont( oFont )
@ 70, 50 RADIO oRadio VAR nOption OF oDlg ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 50, 12 PIXEL ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
AEval( oRadio:aItems, { | oRad | oRad:SetFont ( oFont ), ;
oRad:nClrText := 65535 } )
@ 50, 100 SAY oSay PROMPT "Transparent Text" OF oDlg PIXEL ;
FONT oFont ;
SIZE 100, 12 COLOR 65535
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
oBrush:End()
RETURN NIL
I did some Changes on my Code / Resource - Test-tool
Now each Folder-page shows a different Brush.
The unused Space could be used, to include some more Tests / Controls.
Any useful Extensions ???
Best Regards
Uwe