Column widths in Grid
- To: mathgroup at smc.vnet.net
- Subject: [mg124045] Column widths in Grid
- From: ADL <alberto.dilullo at tiscali.it>
- Date: Sat, 7 Jan 2012 05:18:05 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
I have a problem I was not able to solve. I have a Grid with a header row and the grid is quite long and scrollable, so that I would like to keep the headers always visible. I thoght to dived the header and the data into two panes, like below: header = Grid[ { {"#", "Title A", "B is another title"} }, Frame -> All ]; table = Grid[ { {"AA-BBB-10002", 3.2, 0.1}, {"ZZZB-1002", Indeterminate, 0.002} }, Frame -> All ]; CreateDocument[ Column[ { Pane[header], Pane[table, Scrollbars -> True] } ] ] In order to make this work I need to know the width of each column of "table" and impose it on the corresponding columns of header. Note: I cannot use uniform widths. Now, my problems are two: 1) AbsoluteOptions or AbsoluteCurrentValue do not seem to work on Grid objects 2) The options Scrollbars -> True and Scrollbars -> False change the size of the Pane, so that adapting the table to the Pane does not seem to work either. Did anybody face the same problem and found a solution? Thanks ADL