User defined gradient colors FWH 8.07

User defined gradient colors FWH 8.07

Postby Otto » Sun Jul 27, 2008 6:50 am

Hello Antonio,

I saw that bClrGrad is in those classes:
BAR, BTNBMP, WINDOW, XBROWSE

Could you please post some more examples how to use with BTNBMP and xBrowse.
And if there are more possibilities to use 'User defined gradient colors' also these.

Thanks in advance
Otto
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Sun Jul 27, 2008 7:29 am

Otto,

A XBrowse example:
Code: Select all  Expand view
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw

   USE customer

   DEFINE WINDOW oWnd
   
   @ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS FOOTERS

   oBrw:bClrGrad = { | lInvert | If( ! lInvert,;
                             { { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) },;
                             { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) } },;
                             { { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) },; 
                             { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) } } ) }

   oBrw:CreateFromCode()
   oWnd:oClient = oBrw
   
   ACTIVATE WINDOW oWnd

return nil

Please notice that I use gray color as my window background color
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

Postby Antonio Linares » Sun Jul 27, 2008 7:40 am

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 nageswaragunupudi » Sun Jul 27, 2008 7:42 am

It would look even better if oBrw:nRecSelColor is assigned a suitable green color to match with the headers and footers
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Otto » Sun Jul 27, 2008 7:59 am

Antonio, could you please have a look at this code.
I can't see the gradient colors. Where do I have the mistake?
Regards,
Otto

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oBtn

   DEFINE DIALOG oDlg RESOURCE "Test"

   REDEFINE BTNBMP oBtn PROMPT "A Test" ID 100 OF oDlg ACTION msginfo("test")

    oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) },;
                                       { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } },;
                                     { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) },;
                                       { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBtn:nClrText = nRGB( 255, 255, 255 )


   ACTIVATE DIALOG oDlg CENTERED

return nil



RC-FILE
----------------------------------------------------
test DIALOG 76, 71, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Colors on Buttons"
FONT 8, "MS Sans Serif"
{
CONTROL "A Test", 100, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 70, 62, 50, 22
}

User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Sun Jul 27, 2008 8:01 am

Image
Code: Select all  Expand view
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw

   USE customer

   DEFINE WINDOW oWnd
   
   @ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS FOOTERS ;
      COLORS CLR_WHITE, CLR_BLUE CELL LINES

   oBrw:nRecSelColor = nRGB( 146, 213, 148 )
   oBrw:bClrSelFocus = { || { nRGB( 255, 255, 255 ), nRGB( 146, 213, 148 ) } }
   oBrw:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) },;
                                       { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) } },;
                                     { { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) },; 
                                       { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) } } ) }

   oBrw:CreateFromCode()
   oWnd:oClient = oBrw
   
   ACTIVATE WINDOW oWnd

return nil
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 Antonio Linares » Sun Jul 27, 2008 8:20 am

Image
Code: Select all  Expand view
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw, oBrush

   USE customer

   DEFINE BRUSH oBrush FILE "sky3.bmp"

   DEFINE WINDOW oWnd
   
   @ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS FOOTERS ;
      COLORS CLR_BLUE, CLR_WHITE CELL LINES ALIAS "customer"

   oBrw:nRecSelColor = nRGB( 146, 213, 148 )
   oBrw:bClrSelFocus = { || { nRGB( 255, 255, 255 ), nRGB( 146, 213, 148 ) } }
   oBrw:SetBackGround( oBrush )
   oBrw:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) },;
                                       { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) } },;
                                     { { 0.5, nRGB( 197, 235, 198 ), nRGB( 20, 186, 182 ) },; 
                                       { 0.5, nRGB( 63, 177, 66 ), nRGB( 197, 235, 198 ) } } ) }

   oBrw:CreateFromCode()
   oWnd:oClient = oBrw
   
   ACTIVATE WINDOW oWnd

return nil
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 Antonio Linares » Sun Jul 27, 2008 8:21 am

Dear Uwe,

You could now create a nice visual designer for the XBrowse :-)
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 Antonio Linares » Sun Jul 27, 2008 8:32 am

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

Postby Antonio Linares » Sun Jul 27, 2008 8:37 am

Otto,

Single BtnBmp buttons are not using bClrGrad yet. They will do it in next FWH build.

For now, they only use it when placed on buttonbars.
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

Visual-designer for xBrowse with new options

Postby ukoenig » Fri Aug 01, 2008 5:16 pm

Hello,

to modify the Visual-designer with all the new
options : Gradient ..... , is on my to do-list.
As well i'm busy to create a new MAKE-tool.

Is it better, to carry on with xBrowse at first ?

Best regards
Uwe :lol:
Last edited by ukoenig on Fri Aug 01, 2008 6:20 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Fri Aug 01, 2008 5:25 pm

Dear Uwe,

Its up to you, though there are many FWH users migrating from other browses to xbrowse these days and surely they will appreciate a visual assistant from you, thanks :-)
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


Return to FiveWin for Harbour/xHarbour

Who is online

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