Grid的窗口如何使第一列固定不动?
①选上data OBJECT的HSplitScroll属性
②在constructor事件中:
dw_1.Object.DataWindow.HorizontalScrollSplit=integer(dw_1.describe("#1.width")) //第一列的宽度
③在scrollhorizontal事件中:
int i
if pane = 1 then
i = integer(this.OBJECT.datawindow.horizontalscrollposition2)
if i < 1 or isnull(i) then return
if scrollpos > 0 then
this.OBJECT.datawindow.horizontalScrollPosition = 0
end if
else
i = integer(this.Object.DataWindow.HorizontalScrollSplit)
if i < 1 or isnull(i) then return
if i > scrollpos then
this.OBJECT.datawindow.horizontalScrollPosition2 = i
end if
end if
页:
[1]