Closed MDeutschmann-Imperia closed 9 years ago
I am afraid, I might misunderstand your request.
Using empty table cells, you get the table with borders but without text inside:
<Tr>
<Td></Td>
<Td></Td>
</Tr>
The Rahmen-element contains two elements: TextBlock+Tabelle. Both elements ("Headline" + Tabelle with "Zelle A" + "Zelle B" should be surrounded by "Rahmen"?!
This is a bug. The element
You can use a "Gruppe" ("Group" - a scratch page), place the two objects inside the group and draw a frame around the contents of the group. See example below.
I'd use a table for everything that needs a frame around it.
If you know the dimensions of the object, you can always use ObjektAusgeben / Linie (PlaceObject / Rule) to draw your own frame. This has the (dis-)advantage (depends on what you need) of having a rule exactly at the grid-cell borders.
<?xml version="1.0"?>
<Layout xmlns:sd="urn:speedata:2009/publisher/functions/de"
xmlns="urn:speedata.de:2009/publisher/de">
<SetzeRaster nx="43" ny="44"/>
<Datensatz element="data">
<Gruppe name="test">
<Inhalt>
<ObjektAusgeben>
<Textblock breite="42">
<Absatz>
<Wert>Headline</Wert>
</Absatz>
</Textblock>
</ObjektAusgeben>
<ObjektAusgeben zeile="2" spalte="1">
<Tabelle breite="42" padding="1mm" zeilenabstand="0mm" spaltenabstand="0pt" dehnen="max">
<Spalten>
<Spalte breite="7"/>
<Spalte breite="35"/>
</Spalten>
<Tr>
<Td>
<Absatz>
<Wert>Zelle A</Wert>
</Absatz>
</Td>
<Td>
<Absatz>
<Wert>Zelle B</Wert>
</Absatz>
</Td>
</Tr>
</Tabelle>
</ObjektAusgeben>
</Inhalt>
</Gruppe>
<ObjektAusgeben spalte="1" zeile="43" vreferenz="bottom" rahmenfarbe="black"
rahmen="durchgezogen" gruppenname="test"/>
</Datensatz>
</Layout>
gives
Thanks for sharing that workaround! In my case "Rahmen" has the advantage of growing/shriking automatically when more or less text is read from data.xml. Constructing Border based on Single Lines is more complicated when respecting amount of dynamic text, isn't it?
Actually I won't consider this as a workaround (at least at the moment). Multiple objects in one PlaceObject (ObjektAusgeben) is officially not supported. If you need some frames, groups (Gruppe) and Tables are a good way to go.
Using single lines with absolute positioning can be a good option, if you need the grid alignment.
The following code produces a border that encloses the table, but not the contained text. Any ideas how to create such a bounding box without placing the text in the table.