Checkbox and Radio are not transparent!?

Checkbox and Radio are not transparent!?

Postby byte-one » Wed Oct 29, 2008 4:49 pm

On Dialogs with clausula TRANSPARENT and gradient-background the text from this controls are not transparent! Any solution?
Last edited by byte-one on Fri Feb 06, 2009 4:13 pm, edited 1 time in total.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Wed Oct 29, 2008 7:11 pm

Günther,

Please review fwh\samples\TestTrn1.prg

Image
regards, saludos

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

Postby byte-one » Wed Oct 29, 2008 10:00 pm

Antonio, I am using not a bitmap as background!
I use as background:
Code: Select all  Expand view
...ON PAINT gradientfill(oDlg:hDC,0,0,oDlg:nHeight(),oDlg:nWidth(),{{1,CLR_WHITE,CLR_RED}})
Last edited by byte-one on Wed Oct 29, 2008 10:51 pm, edited 1 time in total.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Radio and Checkbox on Gradient

Postby ukoenig » Wed Oct 29, 2008 10:45 pm

Hello Günther,

My test with Dialog-gradient-background : not transparent.

Image

Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby byte-one » Wed Oct 29, 2008 10:47 pm

Uwe, thats not transparent!?
And also the SAYS with clausula UPDATE are not transparent, when the text are updated!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Transparent

Postby ukoenig » Wed Oct 29, 2008 10:58 pm

Hello Günther,

All tests in Dialog and Folder :

Dialog and Folder with Gradient :
Folder is OK.

Image

Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Thu Oct 30, 2008 12:33 am

Günther,

>
I am using not a bitmap as background!
I use as background: ... gradientfill()
>

Then the transparent clause does not work

We have previously commented this issue on these forums. It is a Windows limitation:

http://forums.fivetechsoft.com/viewtopic.php?t=12117
regards, saludos

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

Transparent in Dialog

Postby ukoenig » Thu Oct 30, 2008 12:42 pm

Hello,

I did some tests with Dialog and Transparent :
The 2. Dialog captured the gradient from Dialog 1.
Checkbox and Radio are transparent.

Image

Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby byte-one » Thu Oct 30, 2008 12:53 pm

Uwe, please show me the source!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Thu Oct 30, 2008 1:00 pm

Uwe,

I guess you are using a NULL brush, so there is no background brush and the one from the main dialog is seen
regards, saludos

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

Postby byte-one » Thu Oct 30, 2008 1:55 pm

Antonio, is it possible to create a bmp from the gradientfill() function? The gradient colors for the background are from user and i will paint the dialog with this colors.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Transparent

Postby ukoenig » Thu Oct 30, 2008 2:18 pm

Antonio,
Another test. The Test-Dialog-gradient is complete different to the others.
The Dialog uses the normal Gradient-function as background.

sample 1
Image

sample 2
Image

Image - test
Image

Code: Select all  Expand view

// ---------- PREVIEW  -------------------------------------

FUNCTION NEW_SOURCE(oWnd1)
LOCAL oDlg5, oBtn50, oBtn51, oBtn52, oBtn53, oTITLE30

DEFINE DIALOG oDlg5 RESOURCE "Test" OF oWnd TITLE  "Windows- / Dialog-Test and Source" FONT oProgFont

REDEFINE BUTTONBMP oBtn50  ID 50 OF oDlg5 ;
ACTION ( TEST_TRANS ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT "    Dialog-Test" TEXTRIGHT
oBtn50:cToolTip =  { "Show" + CRLF + ;
                                  "BMP-Transparent","BMP", 1, CLR_BLACK, 14089979 }


REDEFINE BUTTONBMP oBtn51  ID 40 OF oDlg5 ;
ACTION ( BITMAP_DAT ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT "     BMP-View" TEXTRIGHT
oBtn51:cToolTip =  { "Show" + CRLF + ;
                                  "Background-BMP","BMP", 1, CLR_BLACK, 14089979 }


REDEFINE BUTTONBMP oBtn52  ID 30 OF oDlg5 ;
ACTION ( SOURCE_DAT ( oDlg5 ) ) ;
BITMAP "Notes" PROMPT "     Source" TEXTRIGHT
oBtn52:cToolTip =  { "Show" + CRLF + ;
                                  "Background-Source","Source", 1, CLR_BLACK, 14089979 }


REDEFINE BUTTONBMP oBtn53  ID 20 OF oDlg5 ;
ACTION ( oDlg5:End() ) ;
BITMAP "Quit" PROMPT " Exit" TEXTRIGHT
oBtn53:cToolTip =  { "Close" + CRLF + ;
                                  "the Dialog","Background-Test", 1, CLR_BLACK, 14089979 }

ACTIVATE DIALOG oDlg5 CENTERED ;
ON INIT NEW_COLOR3a(oDlg5) ;
ON PAINT(  IIF( CLR_POS2 = 1, gradpaint2( hDC, oDlg5 ), NIL ), ;
                    IIF( BR_POS3 = 17, SHOW_PIC2( oDlg5 ), NIL ) )

oWnd1:End()

RETURN(  NIL )

//-------  BMP to Copy Gradient if needed ----------------------------//

FUNCTION BITMAP_DAT(oDlg5)
LOCAL oDlg6

DEFINE DIALOG oDlg6 RESOURCE "Bitmap" OF oDlg5 TITLE  "BMP-Gradient" FONT oProgFont

ACTIVATE DIALOG oDlg6 CENTERED ;
ON PAINT gradpaint2( hDC, oDlg6 ) ;

RETURN( NIL )

// -----------------------------------

Function TEST_TRANS(oDlg5)
Local oDlg6, oBrush, oCbx, oRad, nVal := 1, lVal := .T.

DEFINE BRUSH oBrush FILE "Logo1.bmp"

DEFINE DIALOG oDlg6 RESOURCE "TestBMP" OF oDlg5 BRUSH oBrush TRANSPARENT ;
TITLE  "Transparent-Dialog-Test ( Gradient or Brush )" FONT oProgFont

REDEFINE RADIO oRad VAR nVal ID 10 OF oDlg6
   
REDEFINE CHECKBOX oCbx VAR lVal ID 20 OF oDlg6

// selection
// -----------
// CLR_POS2 = 1  Gradient
// CLR_POS2 = 17  Brush

ACTIVATE DIALOG oDlg6 CENTERED ;
ON PAINT(  IIF( CLR_POS2 = 1, gradpaint2( hDC, oDlg6 ), NIL ), ;
                    IIF( BR_POS3 = 17, SHOW_PIC2( oDlg6 ), NIL ) )

RETURN NIL

// -----------------------------------------------

static func gradpaint2( hDC, oDlg )

// Color-Vars
// ------------
local aGrad1 := { { nMOVE2, BR_COLOR3, BR_COLOR4 }, ;
                            { nMOVE2, BR_COLOR4, BR_COLOR3 } }

// Style Hor. or Vert.
// ---------------------
IF BR_STYLE2 = 1
   GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .T. )
ELSE
   GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .F. )
ENDIF

RETURN NIL

// -----------------------------------

FUNCTION  SHOW_PIC2( oDlg5 )
LOCAL oImage2
LOCAL aRect := GETCLIENTRECT( oDlg5:hWnd )

cNEWLOGO := ALLTRIM(cLOGO2)

IF BR_TYP2 = "B"  // Brush-select
   IF ! Empty( cNEWLOGO ) .and. File( "&cNEWLOGO" )
      DEFINE BRUSH oImage2 FILE "&cNEWLOGO"
      SET BRUSH OF oDlg5 TO oImage2
   ELSE
      MsgAlert("No file selected !","Attention" )
   ENDIF
ENDIF
IF BR_TYP2 = "I" // Image-select
   IF ! Empty( cNEWLOGO ) .and. File( "&cNEWLOGO" )
      @ 0, 0 IMAGE oImage2 SIZE aRect[4], aRect[3] OF oDlg5  ADJUST
      oImage2:LoadBmp( "&cNEWLOGO" )
   ELSE
      MsgAlert("No file selected !","Attention" )
   ENDIF
ENDIF

RETURN( NIL )



Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Thu Oct 30, 2008 7:30 pm

Uwe,

Please run your tests in XP and see what you get

Or, are you using XP with a different theme ?
regards, saludos

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

Postby Antonio Linares » Thu Oct 30, 2008 7:33 pm

Günther,

You can use oDlg:SaveToBmp( cBmpFileName )
regards, saludos

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

Transparent on Dialog

Postby ukoenig » Thu Oct 30, 2008 7:45 pm

Antonio,

the tests i'have done with VISTA.

I tested with XP and Windows2000

Result :

XP : Radio and SAY is transparent. Checkbox not.

Windows2000 : only SAY is transparent.

Is there a solution for XP, maybe to get the checkbox working as well ?

I still have a question about the text :
For the new release of the tool, to create the background for windows and
Dialog, i added some new functions.
There is a preview for RADIO, CHECKBOX and SAY added.
As well, there is a new small dialog, to create a gradient
and then to cut and save the gradient as Bitmap to use as background ( with adjust ).
I have to test, what happens, using a bitmap ( not the gradient-function ).
Is it possible, to change the textcolor of RADIO, CHECKBOX and SAY at runtime ?

Image

Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests