FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse colour
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
xBrowse colour
Posted: Sat Feb 07, 2009 11:22 AM
Dear Friends,

Is there any trick to fill a colour in the area where Data is not available.

A picture is worth thousand words :-)
Please see the picture.I need a colour to be filled in the area marked in Red Arrow


It would be fine if the empty area can be filled with with the Alternative colours which I have used, and if that is not possible then fill it with any colour.

Regards

Anser
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 11:39 AM
Hello Anserkk,

simply define a Brush as a xBrowse-background.
You are using alternated Row-Colors, ( Blue and Light-Blue ).
The Brush < Sky.bmp > will be a good looking solution.
You can find it in the FWH-Bitmap-directory.
Attention !
-------------
!!! Using a BRUSH, You will only have one Color for the selected Row !!!
Maybe I can find a solution, to keep the Alternated-Row-colors.

// Use a BMP-Brush
//---------------------
DEFINE BRUSH oBrush FILENAME "Sky.bmp"
oBrw:SetBackGround( oBrush )
RELEASE BRUSH oBrush


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.
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 12:07 PM

Dear Mr.Uwe

Thankyou very much.
So there is no trick to acheive it with Colours.
I shall try your BMP suggestion and let you know.

Regards

Anser

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 12:32 PM
Hello Anserkk,

Here You have a Background-Function for xBrowse :

// Your Browser !!!!
.......
.......
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT XBRW_BRUSH(oLbx, 3)

RETURN NIL

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

FUNCTION XBRW_BRUSH(oLbx, nStyle)
LOCAL oBrush

// define any STYLES You need !!!!
// --------------------------------------

IF nStyle = 1
	// Color
	// ---------
	DEFINE BRUSH oBrush COLOR 16513973
ENDIF

IF nStyle = 2
	// Style => BRICKS, BORLAND, TILED ......
	// -----------------------------------------------
	DEFINE BRUSH oBrush STYLE BORLAND
ENDIF

IF nSTYLE = 3
	// Image-Brush
	// -----------------
	DEFINE BRUSH oBrush FILENAME "SKY3.bmp"
ENDIF

// Alternated Row-Colors doesn't work with style 1 - 3
// ----------------------------------------------------------
aClrCol := { { 0, 16513973 }, { 0, 16644833 } } 
oLbx:bClrStd := { || aClrCol[ oLbx:KeyNo % 2 + 1 ] }

// Up from FWH 9.01, You can use a Image-adjusted-BMP
// ----------------------------------------------------------------

oLbx:SetBackGround( oBrush )
RELEASE BRUSH oBrush
oLbx:Refresh()

RETURN( NIL )


You can use my xBrowse-Tools, to test Brushes and Colors for xBrowse.
For the Background with Alternated-Row-Colors, I will do some tests
Download :

http://www.pflegeplus.com/fw_downloads/BRWTools5.zip

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.
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 04:55 PM

Dear Mr.Uwe,

Thank you for the Function XBRW_BRUSH(oBrwMenu, 2)

I tried it. As you said, alternative colours (Pyjama Effect) is not possible when BRUSH is used as background. So sad :(

Regards

Anser

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 10:02 PM

Hello Anser,

I think, it is not a real problem,
After the browser is filled with data, You don't notice that anymore.
The < row-color-change > works like a brush.
To have this effect on a image- or style- background, wouln't make sense,
because in this case, You don't see the background anymore.
Did You try out the browser-tools ?.
Maybe it helps You a bit with the xBrowse-design.

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.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBrowse colour
Posted: Sat Feb 07, 2009 10:14 PM

Anser,

> (Pyjama Effect) is not possible when BRUSH is used

You can create a bitmap with such pyjama effect and use it to create the brush, so the brush will have such effect :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion