Index column width setting - indexing

I am having trouble finding settings for first column with index. How can i set width of this col?
setting width to index column

Related

Is There a More Efficient Way of Determining Whether a Table Row Spills Over Into the Footer Than Looping Through All Cells?

I'm currently using Microsoft Word 2016 VBA to programmatically set the AllowBreakAcrossPages setting so that if a row's contents overlaps the footer contents, I toggle the setting so that the row can break across pages. To solve this issue, I'm thinking about looping through all the cells of each table in the document and get the wdVerticalPositionRelativeToPage.Information of the last characters in each cell and comparing it to the footer's height relative to the page. If the last character's height is greater than the footer's, I set the row to break across pages. You can imagine that this is taking a while in a document that has many tables and cells. Is there a more efficient way to know if the row contents overlap the footer contents than looping through each cell in the row to see if a cell is causing the row to overlap the footer?
I tried using the row height property but discovered that if the HeightRule property of the specified row is wdRowHeightAuto then that means I can't access the row height via VBA.
I discovered that it's possible to use wdVerticalPositionRelativeToPage.Information with a row by row comparison of the prior and next rows like described in another posting - https://stackoverflow.com/a/14753231/4372244.
The only problem with that solution is that it doesn't work for the last row in a table or if it's the last row on a page.
Therefore, I'm examining a cell by cell solution.

DataGridViewAutoFilterTextBox displaying small number of items

Using this article (https://learn.microsoft.com/en-us/previous-versions/dotnet/articles/aa480727(v=msdn.10)#initialization) and the library included in the demo project I have setup Excel-like autofiltering on a datagridview.
However on columns where there are not many distinct values, only one or two rows are displayed:
In this example, there are actually 3 or 4 values in the filter list that the user could select but only two rows are displayed and the rest you must scroll to find.
I've been unable to find where the height of the list box is set. Any can anyone point out where I can change/set this?
I believe that this may be what you are looking for.
In the documentation is the following paragraph:
The SetDropDownListBoxBounds Method
The SetDropDownListBoxBounds method initializes the size and location of the drop-down list.
The preferred size depends primarily on the dropDownListBox contents, which are the formatted values stored in the Keys collection of the filters dictionary. The SetDropDownListBoxBounds method first calls the Graphics.MeasureString method for each filter value. For each value, the width is stored if it is wider than all previous values, and the height is added to an accumulating total height for all values. The results are then used to determine the preferred size.
The preferred height is the smallest of the following values:
The accumulated height of all filter values.
The user-specified maximum height as calculated from the
DropDownListBoxMaxLines property value.
The available height of the DataGridView control client area.

Datatables FixedHeader sets columns to equal widths after scrolling is done

I initialize my HTML table using the columns option, so that I can set the widths for each indiviual column. Initially, fixedHeader preserves the specified columns widths, once I start scrolling. After I scroll all the way back up, to the point that 'fixedHeaders' are deactivated (no more sticky headers), the column widths are not preserved - but they are all set to equal widths.
Anybody have an idea on how can I force the column widths to be preserved?
You should set autoWidth option to false,as described here:autowidth . Then the related topics of :columns.adjust(). will be helpful too.

Getting table height dynamically in iText

Is there a way of getting the height of a table before adding it to the document?
At first glance, I supposed that the number of rows in the table is enough to calculate height since I know the font size. However, some rows break that rule. For instance, one cell might store a paragraph that has more than one line. Hence, what I need to know is the total of the heights of every row.
Yeah, answer was not complicated.
In order to get the height of a table, one must set the width of the table first. In other words,
table.setTotalWidth((PageSize.A4.getWidth() - document.leftMargin()
- document.rightMargin()) * table.getWidthPercentage() / 100);
System.out.println(table.calculateHeights());
does give the height of the table.
If you want to get table's height dynamically you can do so only after you have added all the content to it. In order to make this work you have to set its fixed width property and locked width property first.
e.g.
table.setTotalWidth(555f);
table.setLockedWidth(true);
after this you can get table's height by using its table.getTotalHeight() method

Getting position of pdfptable

in my document I am creating 3-4 pdfptables.
At design time I don't know the size of the tables. I need to place the 2nd table right after the first, but I dont know the position of the first (I can't calculate it because I dont know how big it is). How do I know where to place the second table?
You can figure out the total height of the table dynamically. After you use the WriteSelectedRows() function, you can call the .TotalHeight() property to find out how tall your table was (in points). Then figure out with some calculations where it ends and where the next one should begin.
That's right the table height and width is dynamically calculated, but you don't have to call WriteSelectedRows() function. You have to set either height or width.
In my case I had to first calculate that if font used can fill the page if not I had to dynamically change the font appropriately. So I find (by mistake) if you set TotalWidth the TotalHeight is automatically set/calculated.
Sanjay