Highlighted
Absent Member.
Absent Member.
1229 views

[archive] dead space on right end of grid

[Migrated content. Thread originally posted on 08 October 2008]

I had this problem once before but cant remember how to fix it. A grid that has a horizontal scroll bar seems to add 'dead space'; the size of the grid is not limited to the last column when scrolling to the right. (?)
0 Likes
6 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

The grid will independent of columns get as wide as you set it to, if the column width multiplied by the number of columns together does not add up, then the remaining will be 'dead space'.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

thanks for the reply -
I know there must be a simple solution to this.
The grid width is set to 84.4, the columns of different length total 143 by picture, 157 by display. To set the grid the same size as the column totals would make the grid larger than the window for the grid - the reason for the horizontal scroll. (?)
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

Setting your grid's VIRTUAL-WIDTH to the sum of your columns' widths (in characters) should remove the 'dead space'.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

It may also have to do with cell size. Check the CELLS syntax on the width of your grid.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

Thanks for the suggestions, I did try setting virtual length to the sum of cell widths - without success, there is still dead space when I make virtual width the sum of 'Display' values of Columns settings. (Making it the sum of ''Picture' values in columns settings makes the grid too short cutting off the last columns and still allowing the same 'dead space'. I have made the columns based upon a record in working storage rather than Property defined. Dont know if that has something to do with the problem. Here is the CELL value from the SCR module description:

03 Screen1-Gd-1, Grid,
COL 4.10, LINE 48.20, LINES 20.60 CELLS,
SIZE 84.80 CELLS,
3-D, CENTERED-HEADINGS, COLUMN-HEADINGS,
DATA-COLUMNS (1, 5, 45, 85, 96, 99, 119, 144, 145),
DISPLAY-COLUMNS (1, 6, 46, 86, 96, 102, 120, 142, 150),
ALIGNMENT ("C", "C", "C", "R", "C", "C", "U", "C", "C"),
SEPARATION (2, 1, 1, 1, 1, 1, 1, 1, 1),
COLUMN-DIVIDERS (2, 1, 1, 1, 1, 1, 1, 1, 1),
CURSOR-FRAME-WIDTH 3, DIVIDER-COLOR 1, DRAG-COLOR 1,
FONT IS MS-Sans-Serif6, HEADING-COLOR 257,
HEADING-DIVIDER-COLOR 1, HSCROLL, ID IS 27, NUM-ROWS 10,
RECORD-TO-ADD Screen1-Gd-1-Record, TILED-HEADINGS,
USE-TAB, VPADDING 50, VIRTUAL-WIDTH 157, VSCROLL,
EVENT PROCEDURE Screen1-Gd-1-Event-Proc.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] dead space on right end of grid

Not sure, but I think it could be related to your font size. I used MS-Sans-Serif10, then the virtual-width seemed to work.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.