General XMetaL Discussion
schwamkrug February 25, 2015 at 7:07 pm
Make attributes editable withing document content?February 25, 2015 at 7:07 pmParticipants 3Replies 4Last Activity 7 years, 7 months ago
Is there a way for me to configure XMetaL such that certain attributes are editable within the regular editing area, as if it's element content? I know how *display* them using CSS:
content: “@bar=” attr(bar);
But I'd like to be able to make them editable in the same way. Is this possible?Derek Read February 25, 2015 at 7:24 pm
Reply to: Make attributes editable withing document content?February 25, 2015 at 7:24 pm
To do this you would need to embed either an XFT form or ActiveX control of some kind.
XMetaL Developer's Customization Guide discusses creating and embedding XFT. Search for “XFT” in the Customization Guide for relevant topics.
You can also embed an ActiveX (or OCX) control, but it is probably easier for most people to create an XFT than an ActiveX control. XMetaL Developer includes a tool for creating and editing XFT. ActiveX controls are created using 3rd party software (usually from Microsoft). For information on embedding an ActiveX control search for “In-Place Control” in the Customization Guide. If you have a control already, or you can use one that is part of Windows or another product (one good example would be the Microsoft “calendar” control).
If the attributes you are setting have a very limited number of options then you might get away with doing something like this if this type of UI would work for your users: http://forums.xmetal.com/index.php/topic,2259.0.htmlDerek Read February 25, 2015 at 7:28 pm
Reply to: Make attributes editable withing document content?February 25, 2015 at 7:28 pm
Another option might be to add new items to the context menu (mouse right-click / Shift+F10) to aid with setting attributes.
Something along the lines of this example:
http://forums.xmetal.com/index.php/topic,738.0.htmlDerek Read February 25, 2015 at 7:29 pm
Reply to: Make attributes editable withing document content?February 25, 2015 at 7:29 pm
The simplest solution of course is to just let users use the Attribute Inspector unless they have a very specific reason to not like how it works.schwamkrug February 26, 2015 at 8:38 pm
Reply to: Make attributes editable withing document content?February 26, 2015 at 8:38 pm
Thanks, Derek. I'll look those over for ideas. To give some background, the reason I'm looking into this is because we have some cases where users have to type in values (as opposed to selecting from a list) for several attributes. Most of the time, the attribute inspector is great. Attributes usually aren't modified, so they're hidden until they're needed. But when there are a lot of attributes to modify, using the attribute inspector isn't ideal… it's just a lot of switching back and forth between placing your cursor in the right spot in the document, then switching to the attribute inspector to find the attribute and enter/modify its value. Some people try switching to plain-text view, but become frustrated with that for other reasons.
- You must be logged in to reply to this topic.