Proposal to change TXBrowse Class to show sharp alignments

Proposal to change TXBrowse Class to show sharp alignments

Postby RAMESHBABU » Thu Jan 15, 2015 6:12 am

Dear Antonio,

I Propose the following changes to TxBrowse to
show the Boxes and Lines sharper touching to
their borders:
Code: Select all  Expand view

Line 580:
*METHOD BrwWidth()     INLINE GetClientRect( ::hWnd )[ 4 ]
 METHOD BrwWidth()     INLINE GetClientRect( ::hWnd )[ 4 ] + 2       // +2 IS ADDED BY RAMESH BABU P TO TOUCH THE BROWSER COLUMN TO THE RIGHT BORDER

Line 1452:
*DrawVert( hDC, nCol - 3, nHeight, nTemp,          hWhitePen )       // DELETED BY RAMESH BABU P - TO REMOVE THE WHITE COLUMN OF ROW SELECTOR
 DrawVert( hDC, nCol - 2, nHeight, nTemp,          hGrayPen )

Line 1455:
*DrawVert( hDC, 1,        0,       nBrwHeight + 3, hWhitePen )       // DELETED BY RAMESH BABU P - TO REMOVE THE WHITE COLUMN OF ROW SELECTOR

Lines 1637 and 1638:
*DrawHorz( hDC, nRow,     2, ::nRecSelWidth - 4, hGrayPen  )         // THIS LINE IS DELETED BY RAMESH BABU P TO REDUCE THE GAP BETWEEN RECORD SELECTOR ROW AND FIRST COLUMN ROW
*DrawHorz( hDC, nRow + 1, 2, ::nRecSelWidth - 4, hWhitePen )         // THIS LINE IS DELETED BY RAMESH BABU P TO REDUCE THE GAP BETWEEN RECORD SELECTOR ROW AND FIRST COLUMN ROW
DrawHorz( hDC, nRow,    1, ::nRecSelWidth - 0, hGrayPen  )           // THIS LINE IS ADDED BY RAMESH BABU P - REDUCED 4 THE GAP BETWEEN RECORD SELECTOR ROW AND FIRST COLUMN ROW

Line 1696:    
*DrawHorz( hDC, nRow, 1, nBrwWidth, hHeaderPen ) //hColPen )         // DELETED BY RAMESH BABU P   - PAINTING HEADER BOTTOM ROW IN BLUE COLOR
DrawHorz( hDC, nRow, 1, nBrwWidth, hGrayPen )   //hColPen )          // CORRECTED BY RAMESH BABU P - NOW HEADER BOTTOM LINE PROPERLY PAINTED WITH GRAY COLOR

Line 1701:
*nHeight := ::nHeaderHeight - 3 // Caution: Do not change -3 in a haste. This adjusts 3 pixels added in Adjust method
*nHeight := ::nHeaderHeight // Caution: Do not change -3 in a haste. This adjusts 3 pixels added in Adjust method
nHeight := ::nHeaderHeight - 3                                       // RESTORED Line 1701 BACK BY RAMESH BABU P   - TO REDUCE HEADER HEIGHT IN COMPARISION WITH ::lFlatStyle HEADER HEIGHT

Line 1714:
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hHeaderPen ) // DELETED BY RAMESH BABU P   - PAINTING HEADER COLUMN SEPARATERORS IN BLUE
DrawVert( hDC, nCol - 2, nRow, nRow + nHeight, hGrayPen )            // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS EVEN TOUCHING THE TOP AND BOTTOM LINES OF HEADER

Lines 1716 and 1717:
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen  )  // DELETED BY RAMESH BABU P   - PAINTING 2 PIXEL GAP BETWEEN HEADER COLUMN SEPARATERORS WITH TOP AND BOTTOM LINES
*DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )  // DELETED BY RAMESH BABU P   - PAINTING 2 PIXEL GAP BETWEEN HEADER COLUMN SEPARATERORS WITH TOP AND BOTTOM LINES
DrawVert( hDC, nCol - 2, nRow-1, nRow + nHeight, hGrayPen  )         // DELETED BY RAMESH BABU P   - 2 PIXEL GAP BETWEEN TOP/BOTTOM LINES OF HEADER COLUMN SEPARATERORS IS REMOVED
DrawVert( hDC, nCol - 1, nRow-1, nRow + nHeight, hWhitePen )         // DELETED BY RAMESH BABU P   - 2 PIXEL GAP BETWEEN TOP/BOTTOM LINES OF HEADER COLUMN SEPARATERORS IS REMOVED

Lines 1745 and 1746
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen  )  // DELETED BY RAMESH BABU P
*DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )  // DELETED BY RAMESH BABU P
DrawVert( hDC, nCol - 2, nRow-1, nRow + nHeight, hGrayPen  )         // CHANGED BY RAMESH BABU P TO INCREASED 2 PIXELS TO TOUCH THE RIGHT SIDE BORDER OF THE CONTROL
DrawVert( hDC, nCol - 1, nRow-1, nRow + nHeight, hWhitePen )         // CHANGED BY RAMESH BABU P TO INCREASED 2 PIXELS TO TOUCH THE RIGHT SIDE BORDER OF THE CONTROL

Line 1748:
*DrawHorz( hDC, nRow + nHeight - 1, 0, nBrwWidth, hHeaderPen  )
DrawHorz( hDC, nRow + nHeight - 1, 0, nBrwWidth, hGrayPen  )         // CORRECTED BY RAMESH BABU P - NOW HEADER BOTTOM LINE PROPERLY PAINTED WITH GRAY COLOR

Line 1782:
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hPen )       // DELETED BY RAMESH BABU P   - PAINTING HEADER COLUMN SEPARATERORS IN BLUE
DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )    // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS

Lines 1784 and 1785:
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )   // DELETED BY RAMESH BABU P   - PAINTING HEADER COLUMN SEPARATERORS IN BLUE
*DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )  // DELETED BY RAMESH BABU P   - PAINTING HEADER COLUMN SEPARATERORS IN BLUE
DrawVert( hDC, nCol - 2, nRow-1, nRow + nHeight, hGrayPen )          // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS
DrawVert( hDC, nCol - 1, nRow-1, nRow + nHeight, hWhitePen )         // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS

Line 1792:
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hPen )       // DELETED BY RAMESH BABU P   - PAINTING FOOTER LAST COLUMN SEPARATERORS IN BLUE
DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )    // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS AND STRETCHED TO TOUCH UP/DOWN LINES

Lines 1794 and 1795
*DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )   // DELETED BY RAMESH BABU P   - PAINTING FOOTER LAST COLUMN SEPARATERORS
*DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )  // DELETED BY RAMESH BABU P   - PAINTING FOOTER LAST COLUMN SEPARATERORS
DrawVert( hDC, nCol - 2, nRow-1, nRow + nHeight, hGrayPen )          // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS
DrawVert( hDC, nCol - 1, nRow-1, nRow + nHeight, hWhitePen )         // CORRECTED BY RAMESH BABU P - NOW PROPERLY PAINTED WITH GRAY COLOR COLUMN SEPARATORS

 


The sample Application to test these changes are available here:

http:\\aksharasoft.com\fwh\testxbrw.zip

Regards,

-Ramesh Babu P
Last edited by RAMESHBABU on Wed Jan 21, 2015 12:06 am, edited 1 time in total.
User avatar
RAMESHBABU
 
Posts: 615
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Proposal to change TBrowse Class to show sharp alignments

Postby nageswaragunupudi » Thu Jan 15, 2015 6:52 am

Thanks for the suggestions. We shall study the changes proposed. If you can provide screenshots of the browse before and after the changes, other users also can offer their opinions.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10289
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Proposal to change TBrowse Class to show sharp alignments

Postby RAMESHBABU » Fri Jan 16, 2015 1:29 am

Dear Mr.Rao,

These are the images comparing before and afater changes.

Image
images upload

Image
image upload

Regards,

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 615
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Proposal to change TBrowse Class to show sharp alignments

Postby nageswaragunupudi » Fri Jan 16, 2015 1:36 am

Thanks Mr Babu
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10289
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Proposal to change TBrowse Class to show sharp alignments

Postby horacio » Sun Jan 18, 2015 5:23 pm

These changes work for me. excellent job Mr Babu. Thank You.

regards
horacio
 
Posts: 1358
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina

Re: Proposal to change TBrowse Class to show sharp alignments

Postby nageswaragunupudi » Sun Jan 18, 2015 5:31 pm

Thanks for your feedback.

We intended to include these changes in 15.01 but could not complete all our tests, as we were to too preoccupied with testing other new/enhanced features for this release. We shall incorporate these suggestions in the next release.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10289
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Proposal to change TBrowse Class to show sharp alignments

Postby Horizon » Sun Jan 18, 2015 5:57 pm

Good work Mr. Babu.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm

Re: Proposal to change TBrowse Class to show sharp alignments

Postby carlos vargas » Sun Jan 18, 2015 11:50 pm

Ramesh, can you post the code of samples,
nice colors combination. :-)

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1688
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Proposal to change TBrowse Class to show sharp alignments

Postby RAMESHBABU » Mon Jan 19, 2015 4:26 am

Thank you all for your interest in my work.

Mr.Carlos,

This is the code I used to paint xBrowse

- Ramesh Babu P

Code: Select all  Expand view


...
...

WITH OBJECT oBrw
        oBrw:l2007        := .T.
        oBrw:lFlatStyle   := .F.
        ColorScheme(oBrw)
END

...
...

FUNCTION ColorScheme(oBrw)

LOCAL aHeadGrad := { {  1, RGB(238,248,238), RGB(170,210,110) } }
LOCAL aFootGrad := { {  1, RGB(255,238,213), RGB(244, 147, 0) } }
LOCAL aColorStd := { {  1, RGB(255,255,255), RGB(252,253,213) } }
LOCAL aColorSel := { {  1, RGB(255,238,213), RGB(252,253,117) } }
LOCAL aRowGrad  := { {  1, RGB(255,255,255), RGB(174,221, 15) } }
LOCAL aSelGrad  := { {  1, RGB(255,238,213), RGB(244,147,  0) } }
LOCAL aColorFlt := { {  1, RGB(255,255,255), RGB(195,195,195) } }

WITH OBJECT oBrw

     DO CASE

        CASE :l2007
             :lFlatStyle             := .F.
             :nRowDividerStyle  := LINESTYLE_LIGHTGRAY
             :nColDividerStyle   := LINESTYLE_LIGHTGRAY
             :nRecSelColor        := nRGB(238,248,238)
             :bClrSelFocus        := { || { CLR_BLUE, aSelGrad  } }  // Color of all Columns of Selected Row
             :bClrRowFocus      := { || { CLR_BLUE, aRowGrad  } }  // Un-Selected Columns of Selected Row Color
             :bClrStd               := { || { CLR_BLUE, aColorStd } }  // All Rows of Browser
             :bClrSel               := { || { CLR_BLUE, aColorSel } }  // Selected Row of Browser
             :bClrHeader         := { || { 1, nRGB(238,248,238),nRGB(170,210,110) } }
             :bClrFooter         := { || { 1, nRGB(238,248,238),nRGB(170,210,110) } }
             :bClrGrad            := { | lInvert | If( lInvert, aRowGrad, { { 1, nRGB(238,248,238),nRGB(170,210,110) } } ) }

        CASE :lFlatStyle
             :bClrHeader      := {||{CLR_BLACK, RGB(237,237,237)}}
             :bClrFooter       := :bClrHeader
             :bClrSelFocus    := {|| { CLR_WHITE, GetSysColor( COLOR_HIGHLIGHT )} }
             :bClrStd           := {|| { CLR_BLACK, CLR_WHITE}}
             :bClrSel           := {|| { GetSysColor( COLOR_INACTIVECAPTIONTEXT ), GetSysColor( COLOR_INACTIVECAPTION )} }
             :bClrGrad         := {|| { CLR_BLACK, {{1, CLR_WHITE, GetSysColor( COLOR_BTNFACE ) } } } }  // All Rows of Browser

     ENDCASE
END

RETURN nil

 
User avatar
RAMESHBABU
 
Posts: 615
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 16 guests