Pages: 1
Print
Author Topic: Make attributes editable withing document content?  (Read 2642 times)
schwamkrug
Member

Posts: 33


« on: February 25, 2015, 01:07:05 PM »

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:

foo:before {
   content: "@bar=" attr(bar);
}

But I'd like to be able to make them editable in the same way. Is this possible?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: February 25, 2015, 01:24:37 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.html
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: February 25, 2015, 01:28:27 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.html
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: February 25, 2015, 01:29:18 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.
Logged
schwamkrug
Member

Posts: 33


« Reply #4 on: February 26, 2015, 02:38:22 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.
Logged
Pages: 1
Print
Jump to: