xBrowse metro header

xBrowse metro header

Postby Otto » Wed May 02, 2012 3:22 pm

Hello Antonio,

how should header/footer painting changes for Metro be inserted.
I think we need a style like l2010.
Best regards,
Otto

Image

Code: Select all  Expand view
METHOD PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen ) CLASS TxBrowse

   local nRow, nCol, oCol, nHeight, nBrwWidth, aGroup
   local  aColors
   local nFor, nAt
   local cGrpHdr, nGrpHt, nGrpFrom := 0

   nBrwWidth   := ::BrwWidth()
   aColors     := Eval( ::bClrHeader )

   nRow    := 0
   nHeight := ::nHeaderHeight - 3 // Caution: Do not change -3 in a haste. This adjusts 3 pixels added in Adjust method
 
  DrawHorz( hDC, nRow, 2, nBrwWidth, hWhitePen )
 
   nRow++
    DrawHorz( hDC, nRow, 2, nBrwWidth, hWhitePen )
   nRow++

   for nFor := 1 to nLast
      nCol     := aCols[ nFor ]
      oCol     := ::ColAtPos( nFor )

       // DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen  )
       // DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )
      oCol:PaintHeader( nRow, nCol, nHeight, .f., hDC )

      if oCol:cGrpHdr != cGrpHdr
         cGrpHdr     := oCol:cGrpHdr
         if Empty( oCol:cGrpHdr )
            nGrpFrom       := 0
            aGroup         := nil
         else
            nGrpFrom       := nCol
            nGrpHt         := oCol:nGrpHeight
            nAt            := AScan( ::aHeaderTop, { |a| a[ 3 ] == oCol:nPos } )
            aGroup         := If( nAt > 0, ::aHeaderTop[ nAt ], nil )
         endif
      endif

      if nFor == nLast .or. oCol:cGrpHdr != ::ColAtPos( nFor + 1 ):cGrpHdr
         if ! Empty( cGrpHdr )
            // paint group header
            oCol:PaintHeader( nRow, nGrpFrom, nHeight, .f., hDC, aCols[ nFor + 1 ] - nGrpFrom, ;
                              If( aGroup == nil, nil, aGroup[ 6 ] ) )
              DrawHorz( hDC, nRow + nGrpHt, nGrpFrom - 2, aCols[ nFor + 1 ] - 2, hWhitePen )
         endif
      endif
   next nFor

   nCol     := aCols[ nFor ]
    // DrawVert( hDC, nCol - 2,       nRow + 1, nRow + nHeight - 2, hGrayPen  )
    // DrawVert( hDC, nCol - 1,       nRow + 1, nRow + nHeight - 2, hWhitePen )
    DrawHorz( hDC, nRow + nHeight, 0,        nBrwWidth - 2,      hWhitePen  )


return nil

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


 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse metro header

Postby Otto » Sat Jul 28, 2012 8:16 pm

Are there any plans to insert these chances?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse metro header

Postby nageswaragunupudi » Sun Jul 29, 2012 4:56 am

A new flat style for xBrowse is under development that would look similar to the above. This new style applies to headers, footers and recordselector also.

This may not be ready for 12.07 though.
Regards

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

Re: xBrowse metro header

Postby Otto » Sun Jul 29, 2012 7:05 am

Dear Mr. Rao,
thank you.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests