getFrameProperties: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
Opening up a frame  
Opening up a frame  
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[frame("Frame Test", "width=300; height=200; temporary=0; title=A new title; value=data of relevance"): {test}]
[frame5("Test", "title=My Frame; width=100; height=200; temporary=0; value=99"):{A frame}]
</source>
</source>


Line 23: Line 23:


<source lang="mtmacro" line>
<source lang="mtmacro" line>
[getFrameProperties("Frame Test")]
[getFrameProperties("Test")]
</source>
</source>


The output will be:
The output will be:
<source lang="mtmacro" line>
<source lang="JSON">
{"width":300,"height":200,"temporary":0,"title":"A new title","value":"data of relevance"}
{
  "title": "My Frame",
  "tabtitle": "My Frame",
  "html5": 1,
  "temporary": 0,
  "visible": 1,
  "docked": 1,
  "floating": 0,
  "autohide": 0,
  "height": 1148,
  "width": 285,
  "undocked_x": 1053,
  "undocked_y": 358,
  "undocked_h": 225,
  "undocked_w": 252,
  "value": "99"
}
</source>
</source>
 
|changes=
* '''1.11.0''' - Added more properties.
}}
}}
[[Category:Frame Function]]
[[Category:Frame Function]]

Revision as of 15:57, 23 October 2021

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

getFrameProperties() Function

Introduced in version 1.5.4
Returns a json object holding the properties associated with a given frame. The properties are width, height, temporary, title, and value.

Usage

getFrameProperties(name)

Parameters

  • name - The name of the frame.

Example

Opening up a frame
[frame5("Test", "title=My Frame; width=100; height=200; temporary=0; value=99"):{A frame}]

Getting the properties of the frame:

[getFrameProperties("Test")]

The output will be:

{
  "title": "My Frame",
  "tabtitle": "My Frame",
  "html5": 1,
  "temporary": 0,
  "visible": 1,
  "docked": 1,
  "floating": 0,
  "autohide": 0,
  "height": 1148,
  "width": 285,
  "undocked_x": 1053,
  "undocked_y": 358,
  "undocked_h": 225,
  "undocked_w": 252,
  "value": "99"
}


Version Changes

  • 1.11.0 - Added more properties.