frame (roll option): Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
mNo edit summary
m (Dialog references scrubbed, new image of example frame, changed example code window title)
Line 1: Line 1:
{{stub|Cleaned up and all dialog references scrubbed.}}
{{RollOption
{{RollOption
|name=frame
|name=frame
Line 16: Line 15:
The second parameter is optional, it is a semicolon separated [[property string]], which could include the following parameters:
The second parameter is optional, it is a semicolon separated [[property string]], which could include the following parameters:


The '''temporary''' parameter dictates whether Maptool remembers the size of the dialog window between displays.  Setting this value to 1 causes Maptool to forget the window size.  Example "temporary=1"
The '''temporary''' parameter dictates whether Maptool remembers the size of the frame between displays.  Setting this value to 1 causes Maptool to forget the window size.  Example "temporary=1"


The '''title''' parameter sets the title of the dialog box and replaces the need to set the title from within the HTML code.
The '''title''' parameter sets the title of the frame and replaces the need to set the title from within the HTML code.


|examples=
|examples=
The following code opens up a frame that contains the HTML as shown here:
The following code opens up a frame that contains the HTML as shown here:
 
<table>
[[Image:DialogEx1.png]]
<tr>
 
<td>
[[Image:FrameDemo.png]]
</td>
<td>
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[frame("Frame Test"): {
[frame("Frame Test"): {
   <html>
   <html>
     <head>
     <head>
       <title>Test of Dialog Windows</title>
       <title>Test of Frame Windows</title>
     </head>
     </head>
     <body>
     <body>
Line 42: Line 44:
} ]
} ]
</source>
</source>
</td>
</tr>
</table>


|also=
|also=
{{roll|dialog}}
{{roll|dialog}}<br>
[[Introduction to Dialogs and Frames]]


}}
}}
[[Category:Display Roll Option]]
[[Category:Display Roll Option]]

Revision as of 03:16, 25 May 2009

[frame():] Roll Option

Opens a frame window. This window can be named; attempts to open another frame with the same name cause the old contents to be removed and new contents displayed. Once the named frame is opened and resized by the user, that size becomes its default opening size in the future.

Frames are dockable panels, unlike the modeless [dialog():]. Frames only have a single button for dismissing the frame, located in the title bar.

Usage

[h: frame(frameName [,"temporary; title"] )]

The first parameter, shown as frameName, should be a double-quoted string that specifies the internal name of the frame window. (Note that the title that appears in the title bar of the window is set separately, using HTML that appears inside the frame itself.) (use title parameter from b50 forward)

The second parameter is optional, it is a semicolon separated property string, which could include the following parameters:

The temporary parameter dictates whether Maptool remembers the size of the frame between displays. Setting this value to 1 causes Maptool to forget the window size. Example "temporary=1"

The title parameter sets the title of the frame and replaces the need to set the title from within the HTML code.

Examples

The following code opens up a frame that contains the HTML as shown here:

[frame("Frame Test"): {
  <html>
    <head>
      <title>Test of Frame Windows</title>
    </head>
    <body>
    <table border="1">
    <tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr>
    <tr><td>Line 1, Col 1</td><td colspan="2">Line 1, Cols 2 and 3</td></tr>
    <tr><td rowspan="2">Lines 2 and 3, Col 1</td><td>Line 2, Col 2</td><td>Line 2, Col 3</td></tr>
    <tr><td>Line 3, Col 3</td><td>Line 3, Col 3</td></tr>
    </table>
    </body>
  </html>
} ]

See Also

[dialog():]
Introduction to Dialogs and Frames