Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
How to manage colors of Office 2007 style 
The control can assume the appearance of a Office 2007 style button by setting its Surface property to SURFACE_OFFICE_2007. 
The Office 2007 style carries new dedicated colors which replace the default colors set through the BackColor property (with the exception of the outer border drawn when the SpecialEffect property is set to a value different from SPECIAL_EFFECT_NONE). 
Office 2007 buttons are rendered through the use of 2 vertical linear gradients, each of them made up of 2 colors: the first gradient is set on the North side of the button and the second one is set on the South side of the button. If needed, an optional color can be applied to the 2 existing borders. 
 
Depending upon the button state, all predefined colors may be changed; below a summary of colors applied (with involved properties) in various button states: 
  • Normal 
  • Office2007ColorNorthTop 
    Office2007ColorNorthBottom 
    Office2007ColorSouthTop 
    Office2007ColorSouthBottom 
    Office2007ColorInnerBorder (if left undefined, the border will not be rendered) 
    Office2007ColorOuterBorder (if left undefined, the border will not be rendered) 
  • Pressed 
  • Office2007ColorNorthTopPressed 
    Office2007ColorNorthBottomPressed 
    Office2007ColorSouthTopPressed 
    Office2007ColorSouthBottomPressed 
    Office2007ColorInnerBorderPressed (if left undefined, the border will not be rendered) 
    Office2007ColorOuterBorderPressed (if left undefined, the border will not be rendered) 
  • Mouse over  
  • Office2007ColorNorthTopMouseOver 
    Office2007ColorNorthBottomMouseOver 
    Office2007ColorSouthTopMouseOver 
    Office2007ColorSouthBottomMouseOver 
    Office2007ColorInnerBorderMouseOver (if left undefined, the border will not be rendered) 
    Office2007ColorOuterBorderMouseOver (if left undefined, the border will not be rendered) 
    Each of the borders width, expressed in pixels, can be modified through the Office2007InnerBorderWidth and Office2007OuterBorderWidth properties. 
     
     
     
     
     
     
     
    Copyright © 2002-2009 MultiMedia Soft 
    Return to index