Gradient possible as Folder-background ( xbrowse-tools ) ?

Post Reply
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Gradient possible as Folder-background ( xbrowse-tools ) ?

Post by ukoenig »

Hello,

I'm working on the new xbrowse-tools.
I have to use folders, because of many options.
The 1. page will be the gradient-defines for header and footer.
I would like to have gradients as a folder background.
Is it possible ?

Image

There is nothing like => ON PAINT gradpaint3( hDC, oFld )
i could use.

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

static func gradpaint3( hDC, oFld )

local aGrad1 := { { 0.50, 16054371, 8388608 } }

GradientFill( hDC, 0, 0, oFld:nHeight, oFld:nWidth, aGrad1, .F. )

RETURN NIL

Best 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
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 76 times
Contact:

Post by Antonio Linares »

Uwe,

Here you have a working example:

Test.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, oFld

   DEFINE DIALOG oDlg SIZE 400, 300

   @ 0.5, 1 FOLDER oFld PAGES "One", "Two" SIZE 190, 140
   
   ACTIVATE DIALOG oDlg CENTERED ;
      ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16054371, 8388608 } } ) ;
      ON INIT SetDialogsGradient( oFld )

return nil

function SetDialogsGradient( oFld )

   local n, oDlg
   
   for n = 1 to Len( oFld:aDialogs )
      oDlg = oFld:aDialogs[ n ]
      oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16054371, 8388608 } } ) }
   next   

return nil   

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Gradient in Folders

Post by ukoenig »

Antonio,

Thank you very much for the help.
With that, it looks much nicer now.
I think, it doesn't take a long time, to finish the browse-tools.
Most of it is already done before.
New is only the gradient for header and footer.
After all, we will have a toolbox for visual-design of all components.

Image

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.
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 76 times
Contact:

Post by Antonio Linares »

Dear Uwe,

Thats to you for creating these nice tools for the FiveWin users :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
jose_murugosa
Posts: 1185
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay
Contact:

Post by jose_murugosa »

Antonio Linares wrote:Dear Uwe,

Thats to you for creating these nice tools for the FiveWin users :-)


Bar_gradient is really a great tool, and If you are planning to have this tool for all controls that's wonderful!!.

Thanks for your contribution.
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
Post Reply