更改 Lotus Notes 中按钮的标题

发布于 2024-10-08 14:21:30 字数 40 浏览 0 评论 0原文

如何使用 LotusScript/Formula 更改按钮的标题?

How can I change the caption of a button using LotusScript/Formula?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜深人未静 2024-10-15 14:21:30

按钮中没有挂钩可以让您通过 LotusScript 或公式进行更改。如果您只想在按钮上添加几个不同的标题(并且脚本相同),我曾经将这些各种预定义按钮存储在隐藏表单上的单独富文本项中,然后将它们复制到我的文档使用 LotusScript。例如,如果您尝试在电子邮件中生成并发送按钮,这将很有用,但除非您也以编程方式生成按钮在其上显示的文档,否则没有多大用处。

您可能会发现 NotesRichTextItem 类上未记录的方法“addLinkByIDs”很有用。同样,可能仅在您动态构建文档时才有用,因为更改 UI 文档上的富文本项目并不容易。

有关未记录方法的更多信息,请参见:http://opendom.blogspot。 com/2006/11/undocumented-dom-lotusscript-inventory.html

最后,还有来自 GeniiSoft 的 Midas LSX,它是一个附加组件,可以让您对富文本项目进行大量控制。我不确定,但我敢打赌有一种方法可以使用 LSX 更改按钮标题。 http://www.geniisoft.com/showcase.nsf/MidasLSX

There are no hooks into a button that will let you change it via LotusScript or a Formula. If you only have a few different captions you'd like to have on a button (and the scripts are the same), I've once stored those various predefined buttons on a hidden form, in separate richtext items, and then copied them to my doc using LotusScript. That would be useful if you were trying to generate and send a button in an email for example, but not much use unless you're generating the doc upon which the button appears programmatically as well.

You might find useful the undocumented method "addLinkByIDs" on the NotesRichTextItem class. Again, probably only useful if you're building the document on the fly, as changing rich text items on a UI doc isn't very easy to do.

More info on undocumented methods here: http://opendom.blogspot.com/2006/11/undocumented-dom-lotusscript-inventory.html

Lastly, there's always the Midas LSX from GeniiSoft, which is an add-on that gives you lots of control over rich text items. I don't know for sure, but I'd bet there's a way to change a button caption using that LSX. http://www.geniisoft.com/showcase.nsf/MidasLSX

寒尘 2024-10-15 14:21:30

Ken 说的是真的,但是您可以在 Notes 客户端中使用 JavaScript 更改按钮标签。您需要转到按钮属性的 选项卡并为按钮指定名称值(id 值在更高版本中也适用),然后您可以使用

document.forms[0].ButtonHTMLName.value = "New Caption";

document.forms[0].elements["ButtonHTMLName"].value = "New Caption";

两者之一使用客户端或通用 JavaScript 从 Notes 版本 6 或更高版本中的任意数量的客户端事件触发。

What Ken says is true, but you can change button labels using JavaScript in the Notes client. You'll need to go to the <HTML> tab of the button properties and give the button a name value (an id value works as well in later versions), then you can use

document.forms[0].ButtonHTMLName.value = "New Caption";

or

document.forms[0].elements["ButtonHTMLName"].value = "New Caption";

Either can be triggered from any number of client events in Notes version 6 or higher using client-side or common JavaScript.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文