且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

备注字段在失去焦点时滚动到顶部

更新时间:2022-11-02 23:10:40

我做了类似的事情几年前,对于某人而言,唯一能使其工作的方法是
I did something like this a few years ago for somebody and the only way I could get it to work was to
  1. 使用相同的记录源创建第二个表单
  2. 添加一个备忘录字段
  3. 剥离此形式的所有内容,导航按钮,控制框,分隔线等,以便您只显示备忘录字段
  4. 返回并将此第二个表单作为子表单添加到原始表单

现在您可以滚动通过备注字段,当您单击它到主窗体上的另一个控件时,备注字段将保留在相同的地方。


这是为那些只需要通过备忘录字段滚动来引用其内容的人完成的。如果您编辑备忘录字段并将其保留,它将返回到文本的乞讨。我永远无法找到答案。如果需要,也许你或其他人可以。


Linq ; 0)>

Now you can scroll thru the memo field, and when you click out of it to another control on the main form, the memo field will remain in the same place.

This was done for someone who only needed to scroll thru the memo field to reference its contents. If you edit the memo field and leave it, it will return to the begging of the text. I could never figure out an answer to this. Maybe you or someone else can, if needed.

Linq ;0)>


看起来我现在必须走子形路线。感谢您的提示,如果我想出一个替代方案,我会告诉您。
Looks like I''ll have to go the subform route for now. Thanks for the tip, and I''ll let you know if I come up with an alternative.


我认为没有办法变得公平。它只是我还是你不希望控制在失去焦点后失去编辑位置?我知道Memo字段通常比TextBox更丰富,需要滚动比其他类型的字段更多,但这通常不是TextBox控件的标准行为吗?
I wouldn''t think there would be a way to be fair. Is it just me or would you not expect the control to lose its edit position once the focus is lost? I know Memo fields are often fuller and need scrolling more than other types of field in a TextBox, but would this not be the standard behaviour of a TextBox control generally?