General XMetaL Discussion
sapraaman June 17, 2010 at 4:24 am
Dynamic UIJune 17, 2010 at 4:24 amParticipants 3Replies 4Last Activity 12 years, 7 months ago
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.
AmanDerek Read June 17, 2010 at 9:15 am
Reply to: Dynamic UIJune 17, 2010 at 9:15 am
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.fjeneau9 July 29, 2010 at 4:23 pm
Reply to: Dynamic UIJuly 29, 2010 at 4:23 pm
Is it possible to create an XFT form object in code (no external XFT file) via XMetaLs' API's?Derek Read July 29, 2010 at 7:52 pm
Reply to: Dynamic UIJuly 29, 2010 at 7:52 pm
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?fjeneau9 July 30, 2010 at 5:28 am
Reply to: Dynamic UIJuly 30, 2010 at 5:28 am
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?
- You must be logged in to reply to this topic.