Home Forums General XMetaL Discussion MessageBox and NoticeBox issue… Reply To: MessageBox and NoticeBox issue…

Derek Read

Reply to: MessageBox and NoticeBox issue…

NoticeBox and MessageBox are working as designed. There are no options to display just a Cancel button using either of these APIs.

Alert shows a single button but the text is always “OK” and you cannot change it.

Prompt (the only other type of 'canned' dialog XMetaL provides) is of course not desirable due to the textbox input area.

You can create an XFT dialog using the XFLayout tool provided with XMetaL Developer. XFT dialogs (aka: XFT forms) can have as many or few buttons on them as you like with any text you wish. The buttons can perform any action you can write a script for.

In order to launch your XFT you would use CreateFormDlg() and DoModal(). This initiates the XFT as a modal dialog (which is what you want).

Getting a return value from an XFT is described in this post:
http://forums.xmetal.com/index.php/topic,707.0.html

The tricky bit in your case, I think, is that if your xmlhttp request is actually successful I assume you will want to dismiss the form. You should be able to do that by setting the variable created when CreateFormDlg was initially called to a null value. How that would be integrated into your code I'm not sure but it should be a matter of setting null at the right moment.

Reply

Products
Downloads
Support