Element UI Table column adjust to content - element-ui

How do I have a column that will adjust to the width of his contents?
So if the content is wider, the column will adjust to that size, without breaking words.

Related

Google Sheets Line Chart: adjust horizontal axis limits to exclude missing cells

I noticed that the horizontal axis fits X values even if the corresponding Y-values are missing.
Is there a way to automatically adjust horizontal axis limits to exclude missing cells?
https://docs.google.com/spreadsheets/d/1X3BhDyideX-7kyJ9Y-7xvV1naAwWd9eDPfPy3pP94Ic/edit?usp=sharing (sheet "Horizontal Axis Limits")
Thank you.
Use Data > Filter to hide blank rows. They will automatically be left out of the chart.
Alternatively, create a new data table that omits the blanks, like this:
=query(A1:B, "where B is not null", 1)
Then set the chart's data range to the new table.

Gnostice PDF Engine (Delphi) How to create one table following another

I want to create one table of variable length, followed by another table.
You start a new table with
TableCols := BeginTable(X, Y, NoOfCols);
where X,Y is top left corner of table.
First table may end in middle of first page or extend to subsequent pages. So I do not know Y of 2nd table. Is there a CurrentPosition property that will give me Y? Or a version of BeginTable that does not require X,Y?
You can set the cell height before rendering the table and when you have finished rendering the tables, multiply the cell height with the number of rows. Then, you know the height of the current table.

Rails Axlsx Column Width And Wrap Text

Using Axlsx some of my cells are set to wrap text which works great. The problem I'm running into is how the auto-width of the cells seems to be calculated. It seems like what's happening is initially the data comes in like this:
cell line1 cell line2 cell line3 cell line4 cell line5
Which Axlsx using to set the width to be that big. But then wrap text comes in and correctly sets the cell to this:
cell line1
cell line2
cell line3
cell line4
cell line5
It's height is then set correctly to display all five values but the row width is still huge. Does anyone know if there's a way to get Axlsx to auto-size the cell as if you were to double click the cell within Excel to have it auto size the width? Setting Excel column widths correctly when adding to spreadsheet via Axlsx seems to elude to it but I couldn't get it to have any effect - not sure the :widths property exists anymore or works?
I also have been playing around with column_widths as well e.g. sheet.column_widths *30. Does anyone know if there's a way to force all columns to have the same widths with this property? It doesn't seem to accept an array - only integers/floats/fixnums separated by commas and doing *30 only sets the first column to a width of 30. I don't actually know beforehand how many columns I'm going to be using (dynamic data) so I'd love to be able to set that to just auto-size all of the columns to a certain width.
Check colum_widths function, It iterates through arguments passed and sets that many(number of arguments passed) columns width to passed values.
so, If you want to set X number of columns width to Y, then you should pass [Y]*x array as argument to column_widths, and use spalt(*) operator to convert this array to arguments list.
In your case Number of columns are going to de dynamic, so you can use sheet.column_info.count to get number of columns in sheet and If you want to set all that columns' width to say 30, then all you need to do is, AFTER adding data set width using -
sheet.column_widths *([30]*sheet.column_info.count)
Not a real solution, but I use the following code to set the column width of "wrap columns" when Axlsx makes them too wide:
sheet.column_widths *(sheet.column_info.map { |info| [info.width, 50].min })

MS-Word-2010 cross reference of math. equations gap in paragraph

I created a word document in version 2010. The mathematical equations are described by a number and written as follow.
a= b/c Eq.4.5
Now if I use equation number in text to refer towards a= b/c Eq.4.5 with hyperlink then whole
equation is appearing in text (as shown before in mid of sentence).
After reading into several blogs, I redefine number with 'insert bookmark' option by only selecting number 'Eq.4.5'.
Now if I use this bookmark in text to refer towards Eq.4.5 with hyperlink then a gap is
appearing in text (as shown before in mid of sentence).
Please can someone guide me how to remove this gap from text? as manually I can remove it but in print or update of document it appears again and again. If I switch on 'Show/Hide' option, it look like with small arrows as follows.
--> --> --> --> Eq.4.5
It appears the bookmark counts the 'tab's before the number too. (As that is what the small arrows indicate.)
Try remaking the bookmark and making sure you only have the number selected (by for instance using shift + right arrow key)
This can be done by using a table and a caption. The table is needed to separate the equation from the caption.
Make a table with invisible lines that is 3 columns wide and 1 row.
Edit the properties of the table so that the total table width is 100% width, and the columns are each 10%, 80%, and 10% width.
Set the Valign to the cells to be middle.
Add the equation to the center cell of the table.
Click on the right cell of the table and add a caption. Since the equation is in a separate table cell, the equation will not be considered part of the caption. If the caption is added to the table itself instead of appearing in the cell, then just highlight the caption and drag it into the cell.
Center the equation in its cell and it will be centered in the page.
Right-align the equation number and it will be right-aligned to the page

How does a DBGrid component determine initial column widths to display?

I'm having a difficult time saving/reloading col widths in a DBGrid (actually TMS's DBGrid). TMS includes built-in methods to save/reload col widths, which are working correctly (I can read the values in an ini file). Something, somewhere in my code is overriding the stored values, however. I don't know enough about how col widths are determined to be able to debug the issue.
The grid is ultimately connected to a ClientDataSet file.
TColumn has a method named DefaultWidth, which is called in particular when the width hasn't been explicitly assigned to the column (which is true for the dynamically created grid columns).
Basically, it takes the column's associated field's display width (in chars) and multiplies it by the width of the 0 character (in pixels), using the corresponding font.
It then compares the result to the width of the title (in pixels) and returns the greater value.

Resources