Jump to content

Recommended Posts

Posted

Dear all, I need support for an issue with table.

I have a table composed by 70 rows and 12 columns, Rows height and columns width has been settled before as preliminary, when table being inserted in the drawing.

The scope is to fit the column size to cell contents, with a fixed row height.

Of course I don't know, before writing data into the table's cell, if the contents length will be higher than the columns width, so when table will be drawn and updated I would like to adapt the columns width to cell contents.

I tried to apply the below code but nothing is changing, I tried after writing the cells contents and before writing the cells contents but result it's the same: if cell's contents it's higher than columns width I have the contents carriage return results. See image below.

I Tried also to use the Autoscale2 method but I do not understand how to use nContent parameter, due to it's required as long type variable instead a text as table data cells required.

 

For i = 2 To .Rows - 1

For j = 0 To .Columns - 1

Actable.SetAutoScale i, j, False 'or True

Next j

Next i

 

RetVal = object.GetAutoScale2(nRow, nCol, nContent)

object

Type: Table

The object this method applies to.

nRow

Access: Input-only

Type: Long

The row number of the cell to set.

nCol

Access: Input-only

Type: Long

The column number of the cell to set.

nContent

Access: Input-only

Type: Long

The content value for the cell.

 

Return Value (RetVal)

 

Type: Boolean

 

True: AutoScale is used for the content with the index at the cell location.

False: AutoScale is not used for the content with the index at the cell location.

  • 2 weeks later...
Posted

UP !

Nobody can help me ??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...