以下是引用cssnet在2021-12-17 20:48:08的发言:
因我们好多年前做过“分割条”控件,故而对于它的局限性有一些切身体会与了解。
其实并非“刁难”——本来就特意打了双引号,纯属开个小小玩笑,一认真你就输啦!——VFP的物件,是压不住ActiveX控件的;企图在ActiveX控件上方拖动分割条,你会发觉,只要一拖就被ActiveX控件遮挡住了。
文字表述半天,真没必要;其实你随便试一下就清楚啦。
粗粗地试了一下,感觉如果要求不高还是可行的。
程序代码:
of = CREATEOBJECT("form1")
of.show(1)
RETURN
DEFINE CLASS form1 As Form
Height = 500
Width = 900
lnX = 0
ADD OBJECT RT As Olecontrol WITH OleClass="RICHTEXT.RichtextCtrl.1",Top=10,Left=10,Width=200,Height=400
ADD OBJECT LN as line WITH top=10,left=211,width=0,height=400,borderstyle=3,mousepointer=9
ADD OBJECT WB As Olecontrol WITH OleClass="Shell.Explorer.2",Top=10,Left=213,Width=680,Height=400
PROCEDURE Init
this.lnX = this.ln.left
this.rt.text = "RichtextCtrl"
this.WB.Silent = 1
thisform.WB.navigate2("https://bbs.bccn.net")
ENDPROC
PROCEDURE LN.mousemove(nButton, nShift, nXCoord, nYCoord)
IF (nButton == 1)
xx = nXCoord - thisform.lnX
rtWidth = thisform.rt.Width + xx
wbLeft = thisform.wb.Left + xx
wbWidth = thisform.wb.Width - xx
IF (rtWidth > 20) AND (wbWidth > 20)
thisform.lnX = nXCoord
thisform.rt.Width = rtWidth
this.Left = nXCoord
thisform.wb.Left = wbLeft
thisform.wb.Width = wbWidth
ENDIF
ENDIF
ENDPROC
ENDDEFINE