Pages: 1
Print
Author Topic: How to edit user settings in "Settings.settings" file from xft form?  (Read 889 times)
biswajitsr
Member

Posts: 44


« on: June 11, 2010, 07:12:18 AM »

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...
Logged
dcramer
Member

Posts: 120


« Reply #1 on: June 11, 2010, 09:33:09 AM »

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.

David

* Options.zip (1.79 KB - downloaded 87 times.)
Logged

David Cramer
Technical Writer
Motive, an Alcatel-Lucent Company
Pages: 1
Print
Jump to:  

email us