Hello,
I trying to display radios inside a painted area ( painted with GradientFill or RoundRect ) on dialog, the dialog is defined like TRANSPARENT ( DEFINE DIALOG..... TRANSPARENT ), the say are displayed correctly, but the radios no, I am using
AEval( oRadio:aItems, { | oRm | oRm:lTransparent := .T. } ) to define transparent in radio but I can't obtain the right result
some sugestion?
rtegards
Marcelo
Transparents radios
-
- Posts: 1077
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
- Has thanked: 1 time
Re: Transparents radios
Marcelo,
please have a look at the Dialog-background-function.

Best Regards
Uwe
please have a look at the Dialog-background-function.

Code: Select all | Expand
FUNCTION SHOW_MSG()
Local nValue := 3, oRad
DEFINE DIALOG oPopup FROM nTop, nLeft TO nTop + 280, nLeft + 300 OF oDlg PIXEL FONT oSysFont1 ;
TITLE cHead TRANSPARENT ;
STYLE nOr(WS_POPUP, WS_BORDER, WS_THICKFRAME, WS_CAPTION )
@ 100, 5 RADIO oRad VAR nValue PIXEL ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 40, 12 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
DLG_BRUSH( oPopup, 1, .T., 16770250, 14089979, 0.2 )
ACTIVATE DIALOG oPopup
RETURN( NIL )
//--------- DIALOG Background ------------------------
FUNCTION DLG_BRUSH(oControl, nStyle, lDirect, nVColor, nBColor, nMove, cBrush, cImage)
LOCAL oBrush, oTmp
LOCAL aGrad := { { nMove, nVColor, nBColor }, { nMove, nBColor, nVColor } }
IF nStyle = 1
hDC = CreateCompatibleDC( oControl:GetDC() )
hBmp = CreateCompatibleBitMap( oControl:hDC, oControl:nWidth, oControl:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oControl:nHeight, oControl:nWidth, aGrad, lDirect )
DeleteObject( oControl:oBrush:hBrush )
oBrush := TBrush():New( ,,,, hBmp )
oBrush:Cargo := aGrad
SelectObject( hDC, hBmpOld )
oControl:ReleaseDC()
oControl:SetBrush( oBrush )
RELEASE BRUSH oBrush
ENDIF
IF nStyle = 2
IF File( cImage )
DEFINE IMAGE oTmp FILE cImage
oBrush := TBrush():new( ,,,, ResizeBmp( oTmp:hBitmap, oControl:nWidth, oControl:nHeight, .T. ) )
oControl:SetBrush( oBrush )
oBrush:End()
ELSE
MsgAlert( "Cannot load : " + CRLF + ;
cImage, "Error" )
ENDIF
ENDIF
RETURN( NIL )
Best Regards
Uwe

Last edited by ukoenig on Sat Aug 20, 2011 9:43 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 1077
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
- Has thanked: 1 time
Re: Transparents radios
Uwe,
thanks for response, ok, I can see the transparent radio, but how can I do it, BUT please take in mind that I don't use a gradient or other dialog background, only some dialog area are painted and inside it, I want to put the radios, the says work perfectly.
regards
Marcelo
P.D. sorry I didn't see the code, I will try thanks
thanks for response, ok, I can see the transparent radio, but how can I do it, BUT please take in mind that I don't use a gradient or other dialog background, only some dialog area are painted and inside it, I want to put the radios, the says work perfectly.
regards
Marcelo
P.D. sorry I didn't see the code, I will try thanks
-
- Posts: 1077
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
- Has thanked: 1 time
Re: Transparents radios
Uwe,
your sample is using background dialog brush, it is possible to do without brush? only paint some dialog area
regards
Marcelo
your sample is using background dialog brush, it is possible to do without brush? only paint some dialog area
regards
Marcelo
Re: Transparents radios
// Area
GradientFill( hDC, 50, 0, 130, 100, aGrad, lDirect )
// complete
// GradientFill( hDC, 0, 0, oControl:nHeight, oControl:nWidth, aGrad, lDirect )
Best Regards
Uwe
GradientFill( hDC, 50, 0, 130, 100, aGrad, lDirect )
// complete
// GradientFill( hDC, 0, 0, oControl:nHeight, oControl:nWidth, aGrad, lDirect )
Best Regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 1077
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
- Has thanked: 1 time
Re: Transparents radios
Thanks again Uwe,
but I have a problems with brush, what I am using is a RGROUP class this means that is working like a control, and we can use many of it in the same dialog, do you know if are there others possibilities for solve this issue
regards and thanks for your time
Marcelo
but I have a problems with brush, what I am using is a RGROUP class this means that is working like a control, and we can use many of it in the same dialog, do you know if are there others possibilities for solve this issue
regards and thanks for your time
Marcelo