User defined gradient colors FWH 8.07
User defined gradient colors FWH 8.07
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
A XBrowse example:
Please notice that I use gray color as my window background color
A XBrowse example:
Code: Select all
#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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
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
I can't see the gradient colors. Where do I have the mistake?
Regards,
Otto
Code: Select all
#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
}
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Code: Select all
#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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Code: Select all
#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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Visual-designer for xBrowse with new options
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
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
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: