General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Dynamic UI
-
sapraaman June 17, 2010 at 4:24 am
Dynamic UI
June 17, 2010 at 4:24 amParticipants 3Replies 4Last Activity 12 years, 7 months agoHi,
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,
AmanDerek Read June 17, 2010 at 9:15 am
Reply to: Dynamic UI
June 17, 2010 at 9:15 amNo, 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 UI
July 29, 2010 at 4:23 pmIs 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 UI
July 29, 2010 at 7:52 pmDo 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 UI
July 30, 2010 at 5:28 amHi 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?
-
AuthorPosts
- You must be logged in to reply to this topic.