2020-03-03 12:03:32 +00:00
caption: action-popup
created: 20200303114556528
2022-10-22 12:22:15 +00:00
modified: 20210501203451387
2020-03-03 12:03:32 +00:00
tags: Widgets ActionWidgets
title: ActionPopupWidget
type: text/vnd.tiddlywiki
! Introduction
2020-04-21 21:19:03 +00:00
The ''action-popup'' widget is an [[action widget|ActionWidgets]] that triggers the display of a popup defined via a state tiddler, or clears all displayed popups. ActionWidgets are used within triggering widgets such as the ButtonWidget.
2020-03-03 12:03:32 +00:00
! Content and Attributes
The ''action-popup'' widget is invisible. Any content within it is ignored.
|!Attribute |!Description |
|$state |The title of the state tiddler for the popup |
2022-10-22 12:22:15 +00:00
|$coords |Optional coordinates for the handle to which popup is positioned (in the format `(x,y,w,h)`) |
2021-07-14 08:21:37 +00:00
|$floating |<<.from-version "5.2.0">> Optional. Defaults to `no`. Set to `yes` to create a popup that must be closed explicitly. |
2020-03-03 12:03:32 +00:00
2022-10-22 12:22:15 +00:00
<<.from-version "5.1.23">> If the ''$coords'' attribute is missing or empty then all popups are cancelled.
2020-04-21 21:19:03 +00:00
2021-05-02 09:20:39 +00:00
<<.tip "Delete the state tiddler for a floating popup to close it.">>
2020-03-03 12:03:32 +00:00
! Examples
2020-03-30 19:43:17 +00:00
Here is an example of button that triggers the "more" button in the sidebar "Tools" tab. You may need to scroll to see the popup
2020-03-03 12:03:32 +00:00
<$macrocall $name='wikitext-example-without-html'
src='<$button>
2020-03-30 19:43:17 +00:00
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" $value="$:/core/ui/SideBar/Tools"/>
<$action-popup $state="$:/state/popup/more-2053862905" $coords="(0,20,0,0)"/>
2020-03-03 12:03:32 +00:00
Click me!
</$button>'/>