General XMetaL Discussion
S. Strube October 7, 2009 at 9:34 am
Set properties of multiple selected table cellsOctober 7, 2009 at 9:34 amParticipants 3Replies 4Last Activity 12 years, 8 months ago
in XMetaL it's possible to select several table cells at once. But I haven't found any property or method on Selection object to access these selected cells. Is this not possible or did I miss anything?
Background of the question is: One of our clients wants to select a range of cells and define borders (top/left/bottom/right=true|false) for the group of cells – so we need to access all the outer cells and set resp. properties.
Is there any solution possible with latest XMetaL version?Derek Read October 8, 2009 at 10:33 pm
Reply to: Set properties of multiple selected table cellsOctober 8, 2009 at 10:33 pm
There is no known way to do what you want to do. The way the Selection object functions when in the context of tables (when those tables are being rendered “graphically” as tables) is to return the top left element (table cell) in the selection when that selection consists of more than one element (table cells and / or rows). This is the same regardless of which of the two supported table models you are working with (CALS and HTML).
When tables are not rendered graphically as tables (by using the INI variable tags_on_graphical_tables = false) then the Selection object returns the “normal” type of selection (ie: it spans from the left to the right of what you see the user having selected on the screen and contains all the content in the middle, and you can collapse it left, right, navigate within it, etc), however, by default tables are rendered “graphically”.
One option I can think of that might give your client similar functionality would be to display a dialog that allows them to specify how many cells to the right or down (for example) to apply the identical attribute values to. You can then obtain the Selection (which will be the top left cell even if multiple cells are selected) and walk through the table using the Selection or Range object according to what the user has specified.
We are aware that people want to do these types of things and long term we would like to make it possible to do this sort of thing both in the standard user interface and through our APIs.S. Strube October 9, 2009 at 6:50 am
Reply to: Set properties of multiple selected table cellsOctober 9, 2009 at 6:50 am
Thank you Derek, we will talk back to our customer about your suggested solution.
StefanMrPaul April 16, 2013 at 1:05 pm
Reply to: Set properties of multiple selected table cellsApril 16, 2013 at 1:05 pm
Is this still the case for XMAX v6 or later? Is there still no way to access the selected cells of a CALS table?Derek Read April 16, 2013 at 11:43 pm
Reply to: Set properties of multiple selected table cellsApril 16, 2013 at 11:43 pm
The original feature being asked for here (the ability to set attributes for more than one “cell” at at time) is included with XMetaL Author Enterprise and Essential 8.0. If you select multiple cells in a table (CALS or HTML) the context menu (right click) now has an item named “Fill Cell Attributes” that launches a special dialog that lets you set attributes of your choosing to the same value for all the selected cells. The default value comes from the first cell you selected, and you can type over it (or select another value when it is an enumerated attribute).
I don't believe there are any plans to expose a similar feature in XMAX 8.0 given the current schedule, but we like to make it possible to do everything you can do in XMetaL Author in XMAX so I hope the capability (possibly through APIs) will be added at some point.
If you have a different or more specific requirement it would be best to submit a feature request via XMetaL Support.
- You must be logged in to reply to this topic.