[scribus-dev] Suggestion for new "Table" menu layout/content

Elvis Stansvik elvstone at gmail.com
Tue Aug 9 13:22:12 UTC 2011

Hi Greg,

2011/8/9 Gregory Pittman <gpittman at iglou.com>:
> On 08/09/2011 04:58 AM, Elvis Stansvik wrote:
>> 2011/8/9 a.l.e<ale.comp_06 at xox.ch>:
>>> - will it be possible to add single cells? not sure if the added
>>> complexity
>>> (both in GUI and code) is worth the feature
>> How do you imagine that would work? Adding a cell implies adding a new
>> row and column.
> I can imagine making a table, then up in one corner tacking on a single cell
> like a tab sticking out, and it would be convenient to have that be part of
> the table. I can also imagine adding a partial row or partial column, or
> deleting individual cells in a row or column.

Right. The code to accomplish such a thing is actually already there,
while a little complicated:

#!/usr/bin/env python
from scribus import *

# Create a 4x4 table and select it.
createTable(100, 150, 300, 200, 4, 4, "tbl")

# Now the "tacking on" part :)

# Prepend a row to the table.
insertTableRows(0, 1)

# Unset table borders.

# Unset borders of all cells in the first row except the first.
for col in range(1, getTableColumns()):
    setCellLeftBorder(0, col, [])
    setCellRightBorder(0, col, [])
    setCellTopBorder(0, col, [])
    setCellBottomBorder(0, col, [])

The result can be seen in the attached screenshot.

> As a.l.e says, this may be a complexity not worthwhile at this stage.

Yes. I think we can discuss in the future if we need a special UI for
just adding a single cell somewhere along the edge of a table (which
implies adding a new row there and making the other cells in it
invisible, as shown in the above script).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tack_on.png
Type: image/png
Size: 130634 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110809/3505881f/attachment-0001.png>

More information about the scribus-dev mailing list