Frame around the cell

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Frame around the cell

Post by Natter »

If xBrowse the cursor is positioned in a frame around the cell,
::nMarqueeStyle := MARQSTYLE_SOLIDCELL
it is possible to change the color and thickness of this frame ?

FWH 16.04
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Frame around the cell

Post by nageswaragunupudi »

oBrw:nColorBox := <nYourColor>

or

oBrw:nColorBox := hPen
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Frame around the cell

Post by Natter »

Thank, Mr. Rao !

And the thickness of the frame lines can be changed ?
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Frame around the cell

Post by nageswaragunupudi »

Define a pen with the thickness, type and color you want and then assign
oBrw:nColorBox := hPen

You need to release the pen object yourself after closing the browse.
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Frame around the cell

Post by Natter »

I use xbrowse with the cursor in the form of borders around the cell
hPenCreate(1,4, CLR_RED)
oBrw:nMarqueeStyle := MARQSTYLE_SOLIDCELL
oBrw:nColorBox:=hPen

Everything works fine

But if xBrowse flipping up and down arrows or mousewheel, the grid is painted in the color of the frame (In this case, red). If you click on any row xBowsa everything becomes normal
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Frame around the cell

Post by nageswaragunupudi »

Please add this setting

oBrw:lTransparent := .t.
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Frame around the cell

Post by Natter »

Yes, the effect of the staining grid disappears, but then xBrowse will take the color of the window on which it is located
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Frame around the cell

Post by nageswaragunupudi »

Natter wrote:Yes, the effect of the staining grid disappears, but then xBrowse will take the color of the window on which it is located

For now, can you make the window background color and xbrowse background color the same?
That is normally the case.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Frame around the cell

Post by nageswaragunupudi »

Please make this modification to xbrowse.prg

1) Add a new DATA

Code: Select all | Expand


DATA lFullPaint INIT .f.
 


2) Locate this method:

Code: Select all | Expand


   METHOD FullPaint() INLINE ( ::lTransparent .or. ::lMergeVert .or. ;
                               ::nMarqueeStyle == MARQSTYLE_HIGHLWIN7 )
 

Modiy this method as:

Code: Select all | Expand


   METHOD FullPaint() INLINE ( ::lTransparent .or. ::lMergeVert .or. ::lFullPaint .or. ;
                               ::nMarqueeStyle == MARQSTYLE_HIGHLWIN7 )
 


Now, in your program instead of setting oBrw:lTransparent := .t., SET oBrw:lFullPaint := .t.
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Frame around the cell

Post by Natter »

Thank You, Mr.Rao ! Everything works well
Post Reply