Different cell widths within same table

Everything related to our flagship word processor.
Post Reply
User avatar
JLSchweitzer
Posts: 28
Joined: 2011-10-07 08:16:23

Different cell widths within same table

Post by JLSchweitzer »

I have a document that I converted from MS Word to Nisus. A couple of the tables in the original document had tables where a few cells had different widths within the same table. I need to change some of the widths of individual cells but every time I try--as you've guessed--ALL of the cells change, throwing everything off. I have searched the documentation but haven't found an answer. I see that you can have a different number of cells within each row (page 205). As they say, a picture is worth a thousands words and I think it would be best here. I hope my feeble description and picture will be enough for someone to figure out what I'm trying to accomplish.

Thanks!!
Attachments
different column widths.jpg
different column widths.jpg (92.86 KiB) Viewed 12326 times

rfwilmut
Posts: 15
Joined: 2013-11-11 04:23:31

Re: Different cell widths within same table

Post by rfwilmut »

In the Tables pallette section, under 'Table Cells', the first two buttons in the top row allow you to split or merge selected cells. You could set the entire column with two cells as they will be in the row where you want them, then select the two cells in each applicable row and merge them. If you split cells you can resize them but it seems to effect the entire table as well so you would need to experiment a bit.
Attachments
cells.jpg
cells.jpg (17.42 KiB) Viewed 12323 times

User avatar
phspaelti
Posts: 1183
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Different cell widths within same table

Post by phspaelti »

As rfwilmut says the table you are showing actually has 4 columns (in the visible part). In most rows, columns 2 & 3 have been merged, but in the "March" row the columns 1 & 2 have been merged.

As far as adjusting the widths in a table. There are 3 ways to adjust the width of columns (or the heights of rows):
  • Drag the "box" corners of the table. This will always adjust the whole table. All columns (or rows) will be stretched or shrunk proportionally.
  • Hover over a cell border (either column or row). The width (or height) adjusting cursor will appear. If you drag this the the column to the left (or the row above) will be stretched or shrunk. This will also change the width (or the height) of the whole table, but the change will only affect a single column (or row).
  • Select several columns (or rows) and click on the "Balance Cell widths" (or "Balance Cell heights") button. Only the selected columns (or rows) will be affected. The overall width of the table is left unchanged, but the selected columns (or rows) will all have their width (or height) spread evenly.
This leads me to a feature request:
It would be nice if one could do something like this: Press a key (command? or option?) and then drag the width/height adjusting cursor. This would change the column width (or row height) while keeping the overall table size the same. In this case the columns to the left and right of (or the rows above and below) the cell border would be changed with one stretched and the other shrunk by equal amounts.
philip

User avatar
phspaelti
Posts: 1183
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Different cell widths within same table

Post by phspaelti »

Here is a pair of macros (called "Increase Current Column" and "Decrease Current Column"). With these you can change the column width of the current column without changing the overall size of the table. The amount that you in/decrease the column by is balanced by the column to the left. The amount of change is set at 12 (points?) in the macro code. So if a different amount of change is desired that constant could/should be adjusted.
De-Increase Current Column.zip
(6.3 KiB) Downloaded 331 times
philip

User avatar
greenmorpher
Posts: 767
Joined: 2007-04-12 04:01:46
Location: Melbourne, Australia
Contact:

Re: Different cell widths within same table

Post by greenmorpher »

phspaelti wrote: This leads me to a feature request:
It would be nice if one could do something like this: Press a key (command? or option?) and then drag the width/height adjusting cursor. This would change the column width (or row height) while keeping the overall table size the same. In this case the columns to the left and right of (or the rows above and below) the cell border would be changed with one stretched and the other shrunk by equal amounts.
It would be even nicer if you could set the column widths by measurement and they would stay that way! The tables work pretty well but this lack of precise adjustment to column widths and the ease of changing them all when you don’t actually want to do that, is serous weakness.

Cheers, geoff

User avatar
phspaelti
Posts: 1183
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Different cell widths within same table

Post by phspaelti »

Well we can't do anything about the 'lockability' of the table, but we can adjust the table widths by number. Here is a macro that will give you the current widths of the table columns and let you set them to a specific amount. It works as an endless loop, but you can quit it using "Stop Macro".
Set Column Widths.nwm
(17.75 KiB) Downloaded 309 times
philip

NisusUser
Posts: 281
Joined: 2011-01-12 05:32:38

Re: Different cell widths within same table

Post by NisusUser »

Thank you very much, Philip! I don't know how I would have made even a very simple table for writing down travel distances without your marco. I guess I'm developing a dependency on them! What was frustrating me was that when I moved one column's side line, all the column widths are changed! Ugh! But I confess I've hardly used tables in NWP and hadn't gotten my mind around your explanation here:
phspaelti wrote:As far as adjusting the widths in a table. There are 3 ways to adjust the width of columns (or the heights of rows):
Drag the "box" corners of the table. This will always adjust the whole table. All columns (or rows) will be stretched or shrunk proportionally.
Hover over a cell border (either column or row). The width (or height) adjusting cursor will appear. If you drag this the the column to the left (or the row above) will be stretched or shrunk. This will also change the width (or the height) of the whole table, but the change will only affect a single column (or row).
Select several columns (or rows) and click on the "Balance Cell widths" (or "Balance Cell heights") button. Only the selected columns (or rows) will be affected. The overall width of the table is left unchanged, but the selected columns (or rows) will all have their width (or height) spread evenly.
+1 for this feature request:
phspaelti wrote:This leads me to a feature request:
It would be nice if one could do something like this: Press a key (command? or option?) and then drag the width/height adjusting cursor. This would change the column width (or row height) while keeping the overall table size the same. In this case the columns to the left and right of (or the rows above and below) the cell border would be changed with one stretched and the other shrunk by equal amounts.

User avatar
martin
Official Nisus Person
Posts: 4936
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Different cell widths within same table

Post by martin »

Thanks everyone, consider this feature request filed:
phspaelti wrote:This leads me to a feature request:
It would be nice if one could do something like this: Press a key (command? or option?) and then drag the width/height adjusting cursor. This would change the column width (or row height) while keeping the overall table size the same.

User avatar
greenmorpher
Posts: 767
Joined: 2007-04-12 04:01:46
Location: Melbourne, Australia
Contact:

Re: Different cell widths within same table

Post by greenmorpher »

And to be able to lock the positions as you can't move them by accident so easily.

Maybe any movement of them should demand the use of a modifier key. That would help.

Cheers, geoff

Post Reply