FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse metro header
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
xBrowse metro header
Posted: Wed May 02, 2012 03: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



Code (fw): Select all Collapse
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

//------------------------------------------------------------------//
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: xBrowse metro header
Posted: Sat Jul 28, 2012 08:16 PM

Are there any plans to insert these chances?
Best regards,
Otto

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse metro header
Posted: Sun Jul 29, 2012 04: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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: xBrowse metro header
Posted: Sun Jul 29, 2012 07:05 AM

Dear Mr. Rao,
thank you.
Best regards,
Otto

Continue the discussion