xBrowse color

xBrowse color

Postby Willy » Sat Jul 14, 2007 12:43 pm

Hello,

I am converting to xBrowse.

How can I change the color of the place below the rows if there are less rows than fit in the browse.

Thanks,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby StefanHaupt » Mon Jul 16, 2007 8:10 am

Willi,

try oBrw:SetColor (<nFore>,<nBack>)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Willy » Mon Jul 16, 2007 9:35 am

Sorry but this does not work.

Only the background of the lines is set.

I want the whole panel colored if there are few lines in the browse.

Example. The brwose has place for 25 lines.

In the beginning there are only 2 records added.

I want that the place below those lines is also colored.

Thanks for the reply Stefan.

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Mon Jul 16, 2007 10:23 am

Willy,

Class TXBrowse Method Paint() makes this call:

FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )

so it should fill all its entire surface
regards, saludos

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

Postby Willy » Tue Jul 17, 2007 5:58 pm

Thanks Antonio,

Indeed that line paints the area but when the rows are painted it is overwritten in a blank area.

I Think this is done in the dispend method of the Windows Class.

Is this browse painted correctly in your screens.

I use the xbrowse in a dialog and nog in a window. Could that make a difference.

I do some more tests.

Thanks,

Willy.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Thu Jul 19, 2007 3:57 pm

Antonio,

Is this still a problem everywhere.

Is it possible to paint the whole area in a specified color or am I the first who want to try it.

Thanks,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Jul 19, 2007 4:33 pm

Willy,

Are you able to reproduce the bug using samples\TestXBrw.prg ?
regards, saludos

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

Postby Willy » Thu Jul 19, 2007 10:36 pm

Antonio,

I tried the testxBrowse program.

I think I found something.

The whole panel is not colored when you use a dialog with resources.

That is exactly what I do in my tests.

In the other screens the screen is paited correctly.

I use Workshop for all my screens. So it is important for me.

Greetings,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Thu Jul 26, 2007 6:57 pm

Anyone ?
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Jul 26, 2007 10:22 pm

Willy,

Sorry, we have been busy and couldn't test it. We are going to review it asap
regards, saludos

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

Postby Willy » Thu Jul 26, 2007 11:07 pm

OK
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Jul 26, 2007 11:09 pm

Willy,

We have modified samples\TestXBrw.prg this way and these are our first results:
Code: Select all  Expand view
STATIC FUNCTION NewDialog( oWnd )

   local oDlg, oBrw

   DEFINE DIALOG oDlg RESOURCE "TEST" OF oWnd

   oBrw := TXBrowse():New( oWnd )

   oBrw:CreateFromResource( 101 )

   oBrw:SetArray( { { "first", "row" }, { "second", "row" } } )
   oBrw:aCols[ 1 ]:cHeader = "An array"
   oBrw:aCols[ 2 ]:cHeader = "test"
   oBrw:aCols[ 1 ]:bClrStd = { || { CLR_WHITE, CLR_BLUE } }
   oBrw:aCols[ 2 ]:bClrStd = { || { CLR_WHITE, CLR_BLUE } }

   ACTIVATE DIALOG oDlg ;
      ON INIT oBrw:SetColor( CLR_WHITE, CLR_BLUE )

RETURN NIL

Image
regards, saludos

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

Postby Willy » Fri Jul 27, 2007 7:14 am

This is doing the job.

Thanks Antonio.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests