AllowCellSelection,意思是“允许选择单元格”,你赋值此属性为.F.,即禁止用户选中单元格,既然单元格的控件无法接受焦点,它怎么还能响应你的勾选呢?你要明白每个屬性是什么意思、起什么作用才行啊。你在运行时没发现光标是跳过那个栏的么?看颜色都看得出来啦,蓝色的光带被截断了,表明那一栏是无法进入的。
[ 本帖最后由 TonyDeng 于 2015-5-15 18:21 编辑 ]
PROCEDURE oPlayList.Init WITH This .ReadOnly = .T. .DeleteMark = .F. .RecordMark = .F. .GridLines = 0 .ScrollBars = 0 .HighlightStyle = 2 .RecordSourceType = 1 .RecordSource = "songs" .ColumnCount = 2 WITH .Columns(1) WITH .Header1 .Caption = "歌星" .FontBold = .T. .Alignment = 2 ENDWITH .ControlSource = "songs.artiste" .Width = 60 ENDWITH WITH .Columns(2) WITH .Header1 .Caption = "曲目" .FontBold = .T. .Alignment = 2 ENDWITH .ControlSource = "JUSTSTEM(songs.song)" && 取songs表字段song的一部分,JUSTSTEM()函数是提取文件名字符串中扩展名前面的串,注意双引号! .Width = 120 ENDWITH ENDWITH ENDPROC