以下是引用csyx在2023-4-25 11:29:17的发言:
谁知道呢,哈哈哈,这控件就随便弄的,没考虑太多,不知哪里冲突了
把 AfterRowColChange 里面的代码都注释掉,能显示字不?
外面的蓝色的线条把 grid 的 HighLightRow 设为 .F.
把 AfterRowColChange 里面的代码都注释掉,也不能显示

程序代码:
Local nRowHeight, nColWidth, nMagin, nTop, nWidth
m.nRowHeight = This.Parent.Parent.RowHeight
m.nColWidth = This.Parent.Width
m.nMagin = This.BorderWidth
With This.Text1 as TextBox
m.nTop = (m.nRowHeight - 2*m.nMagin - .Height) / 2
m.nTop = Max(m.nMagin, m.nTop)
m.nWidth = Max(0, m.nColWidth - 2*m.nMagin)
.Move(m.nMagin+1, m.nTop+1, m.nWidth-1)
EndWith
This.Move(0, 0, m.nColWidth, m.nRowHeight)
Return This.BackStyle

程序代码:
Local oCol as Column
m.oCol = This.Parent
With This.Text1 as TextBox
.ControlSource = m.oCol.ControlSource
.Format = m.oCol.Format
.InputMask = m.oCol.InputMask
.Alignment = m.oCol.Alignment
.FontName = m.oCol.FontName
.FontSize = m.oCol.FontSize
.FontBold = m.oCol.FontBold
.Height = Fontmetric(1, .FontName, .FontSize, Iif(.FontBold, 'B', 'N'))&&是不是这里
EndWith
This.BackColor = 0xffffff
你看一下哪里有冲突
[此贴子已经被作者于2023-4-25 11:45编辑过]