以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关于单元格内容显示问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=61175)

--  作者:jspta
--  发布时间:2014/12/8 13:44:00
--  关于单元格内容显示问题
当单元格内容大于显示的列宽的时候,能够浮现出,否则就不浮现,这个代码怎么判断?
--  作者:lsy
--  发布时间:2014/12/8 13:49:00
--  
Dim gc As Graphics = BaseMainform.CreateGraphics()
Dim size As SizeF = gc.MeasureString(e.Row(e.Col) , e.Table.Font)
Dim w As Integer = e.Col.Width
If w = - 1 Then
    w = 98
End If
If w < size.Width Then
    e.Table.ShowToolTip(e.Row(e.Col),e.Row,e.Col)
End If