N
noall
Unregistered / Unconfirmed
GUEST, unregistred user!
当dbgrid的属性都没做任何修改时,都好好的,
右击dbgrid时选columns editor...加入所有的字段。这时,事件DBGrid1DrawDataCell就
不会执行了。为什么?
DBGrid1DrawDataCell事件是这样写的。。。
if (gdFocused in State) then
begin
if (Field.FieldName = 'PBNAME') then
begin
WITH DBComboBox1 DO BEGIN
Left := Rect.Left + DBGrid1.Left;
Top := Rect.Top + DBGrid1.top;
Width := Rect.Right - Rect.Left;
Height := Rect.Bottom - Rect.Top;
END;
end
end
右击dbgrid时选columns editor...加入所有的字段。这时,事件DBGrid1DrawDataCell就
不会执行了。为什么?
DBGrid1DrawDataCell事件是这样写的。。。
if (gdFocused in State) then
begin
if (Field.FieldName = 'PBNAME') then
begin
WITH DBComboBox1 DO BEGIN
Left := Rect.Left + DBGrid1.Left;
Top := Rect.Top + DBGrid1.top;
Width := Rect.Right - Rect.Left;
Height := Rect.Bottom - Rect.Top;
END;
end
end