public class MyEnhancedInterfaceRenderer : FarPoint.Win.Spread.IInterfaceRenderer
{
FarPoint.Win.Spread.EnhancedInterfaceRenderer enhR = new FarPoint.Win.Spread.EnhancedInterfaceRenderer();
#region IInterfaceRenderer Members
public void PaintRangeGroupButton(System.Drawing.Graphics g, int x, int y, int width, int height, FarPoint.Win.Spread.GroupState groupState, bool rowGroup, bool isLeftToRight)
{
// 在这里实现自定义Button的逻辑
if (groupState == FarPoint.Win.Spread.GroupState.Expanded)
{
g.DrawIcon(new Icon("Icon/Minus.ico"), new Rectangle(x, y, width, height));
}
else if (groupState == FarPoint.Win.Spread.GroupState.Collapsed)
{
g.DrawIcon(new Icon("Icon/Plus.ico"), new Rectangle(x, y, width, height));
}
//enhR.PaintRangeGroupButton(g, x, y, width, height, groupState, rowGroup, isLeftToRight);