Apache OpenOffice (AOO) Bugzilla – Issue 125322
UnoControlGrid horizontal scrollbar does not scroll to the last column
Last modified: 2014-07-30 08:26:09 UTC
Created attachment 83748 [details] Writer document with a macro The horizontal scrollbar of the UnoControlGrid does not scroll to the last column under certain circumstances. See attached document and the report in http://mail-archives.apache.org/mod_mbox/openoffice-api/201407.mbox/%3C1404201380.34013.YahooMailNeo%40web171506.mail.ir2.yahoo.com%3E
(In reply to Ariel Constenla-Haile from comment #0) > See attached document and the report in > http://mail-archives.apache.org/mod_mbox/openoffice-api/201407.mbox/ > %3C1404201380.34013.YahooMailNeo%40web171506.mail.ir2.yahoo.com%3E The message is http://mail-archives.apache.org/mod_mbox/openoffice-api/201407.mbox/%3C1406645734.55547.YahooMailNeo%40web171503.mail.ir2.yahoo.com%3E
.
Workaround offered at the end of this comment. The reason is that the scrollbar is currently used to represent a ratio that is based on the number of columns. The ratio should be based on the width of the grid content. The current configuration is not a problem when all columns have the same width. It becomes a problem when: * the grid control's width is smaller than the total of column widths, which warrants a horizontal scroll bar; * hence, when the scroll bar is to the left, the grid has columns that are not currently visible; * the columns that are not visible (especially the rightmost one) are wider than the one or more columns to the left. Here is a configuration that reproduces the problem: * 5-column grid with vertical scroll bar * grid control's width: 200 * width of columns 1 to 4: 50 * width of column 5: 100 When the horizontal scroll bar is to the right, column #1 is hidden and columns #2 to #5 are visible, but column #5 is visible only for the first 50 units. A **workaround** for fixed-width grids is to add a dummy column as the last one to the right. Its width has to be set to that of the last column to become hidden. In the example configuration above, that last column to become hidden is column #1. Therefore, we need to add data-less column #6 with width=50 so that when the scroll bar is fully to the right, columns #3 to #5 are displayed and the entire width of column #5 becomes visible while the user doesn't know there is a sixth column. There are constraints to this workaround: * columns #5 and #6 should be non-resizeable; * column # 6 should have an empty-string title.