FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour metro style header
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
metro style header
Posted: Sun Jul 29, 2012 08:00 AM
Hello Antonio,
Can you please provide a metro style header menu.

The header menu is part of the hierarchical navigation pattern. It offers the user a
shortcut to navigate to different sections of your app without having to first go back
home via the back button, and then drill into another section. The items in the header
menu should match the various sections of your hub that the user can drill into, plus
a home button at the bottom.
Header menus use custom alignment so the edge of the menu aligns with the edge
of the text and use custom positioning so that the menu always displays under
the header, rather than repositioning if it runs out of room. Header menus use custom width to line up better with the title.








Thanks in advance
Otto
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: metro style header
Posted: Wed Aug 01, 2012 11:40 AM
For me this is working fine.
I deleted all the “gradiant” stuff and changed the painting method to:

Code (fw): Select all Collapse
METHOD Paint() CLASS TRBtn

   local aInfo, hBrush, aRect
   
   aInfo := ::DispBegin()
 
    //Set TRANSPARENT 
    SetBkMode( ::hDC, 1 ) 
    
    aRect := GetClientRect( ::hWnd )
    hBrush =  CreateSolidBrush( ::oWnd:nClrPane )
 
   FillRect( ::hDC, aRect, hBrush )
    
    if ::lMOver = .f.
        ABPaint( ::hDC, 0, 0, ::oBmp:hBitmap, 255 )
   else
        ABPaint( ::hDC, 0, 0, ::oBmpHover:hBitmap, 255 )
   endif
    
    DeleteObject( hBrush )
    
  ::DispEnd( aInfo )return nil

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


Best regards,
Otto

Continue the discussion