回复 10楼 吹水佬
这个非常简单啊,列表框被形状盖住后改变下前景背景啥的,就可以让他看起来跟Enabled=.f.时一模一样了。[此贴子已经被作者于2022-12-2 19:07编辑过]
of = CREATEOBJECT("form1") of.show(1) RETURN DEFINE CLASS form1 as Form ADD OBJECT cmd as commandbutton WITH left=10,top=10,height=24,caption="Enabled=.F." ADD OBJECT lst as list1 PROCEDURE cmd.click this.Caption = "Enabled="+TRANSFORM(thisform.lst.Enabled) thisform.lst.Enabled = !thisform.lst.Enabled ENDPROC ENDDEFINE DEFINE CLASS list1 as ListBox left=10 top=40 width=200 MultiSelect=1 Picture="d:\temp\test_0.png" index = 0 PROCEDURE init FOR i=1 TO 9 this.AddItem(REPLICATE(TRANSFORM(i),10)) ENDFOR this.ListIndex = 1 this.InteractiveChange ENDPROC PROCEDURE InteractiveChange this.Picture(this.index) = "d:\temp\test_0.png" this.index = this.ListIndex this.Picture(this.ListIndex) = "d:\temp\test_1.png" ENDPROC ENDDEFINE