FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A Question about xBrowse-Linestyles
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
A Question about xBrowse-Linestyles
Posted: Wed Aug 24, 2011 04:29 PM
Hello,

I have a Question about xBrowse-Linestyles.
I can change the Linecolors but the predefined Colors ( Linestyles ) don't work anymore on Selection.
Is it possible to change from defined Pen-color to Linestyle ?
It seems with defined Pencolors, Linestyle 1, 2, 3 and 4 are disabled.
I would like to show all possible Combinations.

#define LINESTYLE_NOLINES 0
#define LINESTYLE_BLACK 1
#define LINESTYLE_DARKGRAY 2
#define LINESTYLE_FORECOLOR 3
#define LINESTYLE_LIGHTGRAY 4

#define LINESTYLE_INSET 5
#define LINESTYLE_RAISED 6


I define Pensize and Color for Row and Column like :

oBrw1:hRowPen := CreatePen( PS_SOLID, nBRPen, nPColor )
oBrw1:hColPen := CreatePen( PS_SOLID, nBCPen, nPColor )


and Styles like :

:nColDividerStyle := nCLines
:nRowDividerStyle := nRLines




Best 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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A Question about xBrowse-Linestyles
Posted: Wed Aug 24, 2011 06:28 PM

XBrowse derives Pens from the Linestyles defined by the programmer. That way the DATA of Pens were basically kept for internal use. If we change the pens directly, Xbrowse does not know that pens are not consistent with the linestyles and there can be unexpected behavior. You may directly deal with pens but keep this in mind. Also do not forget to destroy the pens created by xbrowse internally, before substituting with your pens. While direct modification of pens is possible (though I think it was not intended) you need to keep in mind how xbrowse handles the linestyles and pens.

For normal programming, it is not desirable to directly change the pens.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A Question about xBrowse-Linestyles
Posted: Thu Aug 25, 2011 01:43 PM
Mr. Rao,

I agree with You,
I got it working, but there are to many needed changes.
I will replace this Part with other useful Tests.
Maybe any Proposals ?

included Tests :
1. Background ( Brush )
2. Marquestyle
3. Linestyle
4. Fonts
5. Row- and Header-height
6. Head-color or Style 2007
7. Image-selection
8. Pyjama-effect

????



Best 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.

Continue the discussion