General XMetaL Discussion

  • sapraaman

    Dynamic UI

    Participants 3
    Replies 4
    Last Activity 12 years ago

    Hi,

    Since it is not possible to show “Attribute Inspector” as a modal dialog, we are implementing a custom xft form. I have few questions.

    1. I want to create UI controls on the fly (during launch of xft form) and add it to the dialog.
    2. I want to be able to add event handlers to those controls.

    Is it possible in XMetal developer 5.5? Basically, we are trying to build a general purpose modal dialog.

    Thanks,
    Aman

    Reply

    Derek Read

    Reply to: Dynamic UI

    No, this is not possible as far as I know. The best you can do is to place more controls on your form than you will ever need and then either hide / show them, or move them off screen / on screen by altering the value of the left property.

    The alternative would be to create an ActiveX control with GUI (using VB or similar), distribute that as a DLL, OCX, or EXE, and launch it from script.

    Reply

    fjeneau9

    Reply to: Dynamic UI

    Is it possible to create an XFT form object in code (no external XFT file) via XMetaLs' API's?

    Reply

    Derek Read

    Reply to: Dynamic UI

    Do you mean programmatically generate the XFT file and then have XMetaL load it?

    XFT is a binary file format so generating it correctly via script would be very difficult and the file format is undocumented so you would need to reverse engineer an existing form to figure out how to generate one. I don't think it is worth trying.

    Can you let me know why you feel the need to do this? ie: What problem will this solve for you?

    Reply

    fjeneau9

    Reply to: Dynamic UI

    Hi Derek,

    We wanted to create a form (modal dialog box) which generated checkboxes and resized based on how many elements were returned via Application.ActiveDocument.getElementsByTagName(““);

    In the end, I went with your first suggestion to create extra hidden controls and set the code to unhide them when appropriate.  All is well with that, so thanks!

    Now my only issue is how to pass the value returned from the On_Click event of a button into a variable resting within the macro that opened the form.  The value is an array containing the indices of the selected items.  Perhaps I should just check Dlg.DoModal() == 1 and check the values of each checkbox within the macro code?

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support