/// <summary> /// »ñÈ¡ÕýÔÚ»æÖƵı³¾°É« /// </summary> /// <returns></returns> protected override long getPaintingBackColor() { if (Native.PushedControl == this) { return(FCColor.reverse(null, FCDraw.FCCOLORS_BACKCOLOR8)); } else if (Native.HoveredControl == this) { return(FCColor.ratioColor(null, FCDraw.FCCOLORS_BACKCOLOR8, 0.95)); } else { return(FCDraw.FCCOLORS_BACKCOLOR8); } }
/// <summary> /// 绘制控件方法 /// </summary> /// <param name="paint">绘图对象</param> /// <param name="rect">区域</param> /// <param name="clipRect">裁剪区域</param> public override void onPaintControl(FCPaint paint, FCRect rect, FCRect clipRect) { if (m_control != null) { m_control.Text = "C"; m_control.BorderColor = FCColor.Border; if (m_value != null) { m_control.BackColor = FCStr.convertStrToColor(m_value); m_control.TextColor = FCColor.reverse(paint, m_control.BackColor); } int buttonWidth = 30; FCRect bounds = new FCRect(rect.right - 1 - buttonWidth, rect.top + 1, rect.right - 2, rect.bottom - 1); m_control.Bounds = bounds; m_control.Region = new FCRect(0, 0, bounds.right - bounds.left, bounds.bottom - bounds.top); } }