My World 3 for Windows TM
logo

Making popups

As the screen opens, the popup should also appear.

popup window

If you selected PopupTitleOnly for the backdrop of the popup, you will notice that all the window furniture except the title bar has been removed.

The popup can be moved around the screen.

To close it, you will need to add an icon (CloseButton.gif in the My World3\Resources directory, for example). Set the icon's frame type to CloseButton.mwb

You therefore need a way of re-opening the popup if it is needed again.

A simple way of doing this is to start a new text frame (see above) and enter text such as 'open popup' then to set its frame type to (Popup2.mwb).

The key part of this is a single procedure:

DEFPROCOnClick

Open("2")

ENDPROC

Double click on the text frame you made. In the list of frametypes, find the item

PATHSCREEN$+Popup2.mwb

Click on this, then on OK. Save your screen then run it. You should be able to close the popup then re-open it by clicking on the text.

(Please note again that the filename of your popup MUST match that in the script file.

So if you want to open a popup with another name, copy the Popup2.mwb file icon from the Mwb Files directory into the screen 1 area of the resource viewer, edit the popup name then set the frame type of the text or icon which will open the new popup.

If you need to open several popups, you can of course save Popup2.mwb under other names in the Resources Viewer)

Menu Previous Next Contents