General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to edit user settings in "Settings.settings" file from xft form?

  • biswajitsr

    How to edit user settings in "Settings.settings" file from xft form?

    Participants 0
    Replies 1
    Last Activity 12 years, 9 months ago

    I need to change some user settings in XMetal from xft form. So how to do that? I also need to read that settings at document load. My requirement is to give user the ability to select font for documents. Thanks in advance…



    Reply to: How to edit user settings in "Settings.settings" file from xft form?

    I've attached an xft form that reads and writes to an environment variable and a registry value.

    Look at the OnInitialize event for the text fields to see them reading from the registry and env variables. Then see the Apply button's OnClick event to see it writing the values if the user has edited them.

    When the dialog opens, the fields are prepopulated with the current values (if they exist). Then the user clicks apply, the values are updated (if the user has changed them).

    From any other macro  you can use RegRead and Environment methods illustrated in the text field's OnInitialize event to read the setting. What I do is read it and if it's not set, I give them an alert telling them they need to set it, then pop up this dialog. I also make the dialog available from a menu.

    Hope that helps.



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

Lost Your Password?