ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] button
@ 2024-09-16  9:41 Hans van der Meer via ntg-context
  2024-09-16 10:30 ` [NTG-context] button Henning Hraban Ramm
  0 siblings, 1 reply; 2+ messages in thread
From: Hans van der Meer via ntg-context @ 2024-09-16  9:41 UTC (permalink / raw)
  To: NTG ConTeXt; +Cc: Hans van der Meer


[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]

\button is defined to jump to a given reference. However, I would like to place a button that can execute a macro to be defined by myself.
Thus for example pushing the button \executebutton{text}{macro} will execute that macro.

Is this available somewhere in ConTeXT? If not, can it be provided in a future update?

yours sincerely
dr. Hans van der Meer




[-- Attachment #1.2: Type: text/html, Size: 990 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [NTG-context] Re: button
  2024-09-16  9:41 [NTG-context] button Hans van der Meer via ntg-context
@ 2024-09-16 10:30 ` Henning Hraban Ramm
  0 siblings, 0 replies; 2+ messages in thread
From: Henning Hraban Ramm @ 2024-09-16 10:30 UTC (permalink / raw)
  To: ntg-context

Am 16.09.24 um 11:41 schrieb Hans van der Meer via ntg-context:
> \button is defined to jump to a given reference. However, I would like 
> to place a button that can execute a macro to be defined by myself.
> Thus for example pushing the button \executebutton{text}{macro} will 
> execute that macro.
> 
> Is this available somewhere in ConTeXT? If not, can it be provided in a 
> future update?

Did you try \button[Options]{Something}[YourJSFunction] ?

I don’t know it that’s limited to a few predefined functions.

see https://wiki.contextgarden.net/Widgets#JavaScript and 
https://source.contextgarden.net/scrn-but.mkvi

Just to be sure: You understand that this works via JavaScript in the 
viewer, only supported by Acrobat and PDF Studio?

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-16 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16  9:41 [NTG-context] button Hans van der Meer via ntg-context
2024-09-16 10:30 ` [NTG-context] button Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).