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

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

Postby ukoenig » Tue Aug 12, 2008 4:51 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Tue Aug 12, 2008 6:26 pm

Uwe,

Here you have a working example:

Test.prg
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Gradient in Folders

Postby ukoenig » Tue Aug 12, 2008 6:46 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Tue Aug 12, 2008 7:19 pm

Dear Uwe,

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

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

Postby jose_murugosa » Wed Aug 13, 2008 1:08 am

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!!"
User avatar
jose_murugosa
 
Posts: 1180
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests