fpspread表格怎么将单元格设置成按钮类型的?如图
--------------------编程问答-------------------- 有人帮解决一下吗? --------------------编程问答-------------------- 好像帮助的示例没有讲!我也在学习这个控件。想同你建立联系,共同学习tcr@tcr.cn --------------------编程问答-------------------- 葡萄城里有一些解决方案, 都不完美. --------------------编程问答--------------------
'用自绘风格
Private Sub Form_Load()
With vaSpread1
.Col = 1
.Row = -1
.CellType = SS_CELL_TYPE_OWNER_DRAWN
End With
End Sub
Private Sub vaSpread1_DrawItem(ByVal Col As Long, ByVal Row As Long, ByVal hDC As Stdole.OLE_HANDLE, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long, ByVal Style As Long)
Dim rc As RECT
rc.Top = Top / Screen.TwipsPerPixelX + 1
rc.Bottom = Bottom / Screen.TwipsPerPixelY - 1
rc.Right = Right / Screen.TwipsPerPixelX - 1
rc.Left = rc.Right - (rc.Bottom - rc.Top)
DrawFrameControl hDC, rc, DFC_BUTTON, DFCS_BUTTONPUSH
End Sub
补充:VB , 控件