Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl and CellJoin problems
GridCtrl and CellJoin problems [message #27833] |
Thu, 05 August 2010 21:23 |
jeremy_c
Messages: 175 Registered: August 2007 Location: Ohio, USA
|
Experienced Member |
|
|
Hello, I am having problems figuring out the proper method for doing the cell joins. What I want in the end is a 2 row header and table that looks like this:
+--------+---------------+---------------+
| | Mode | Band |
| Need +---------------+---------------+
| | P | L | E | Q | P | L | E | Q |
+--------+---+---+---+---+---+---+---+---+
| ITU Z | Y | W | C | | N | Y | Y | Y |
| CQ Z | Y | W | C | | N | Y | Y | Y |
| State | | Y | W | N | N | Y | Y | Y |
+--------+---+---+---+---+---+---+---+---+
Need, Mode, Band being major headers and the P,L,E,Q's being minor headers under the grouping of Mode and Band.
Right now I am working on just making the Needs and Band header setup work. I have something like this:
needs.AddColumn("Need");
needs.AddColumn("Band");
needs.AddColumn("bp");
needs.AddColumn("bl");
needs.AddColumn("be");
needs.AddColumn("bq");
needs.AddRow("","P","L","E","Q");
needs.SetFixedRows(2);
needs.JoinFixedCells(0,0,1,1); // Needs span 1 row
but anything I try with the next step just messes things all up. I guess I am not understanding the parameters:
int left, int top, int right, int bottom
I would assume that I would use:
.JoinFixedCells(1, 0, 4, 0);
to make the Column on the left (1), row (0), span to the right to column (4), row (0).
Any thoughts on what I am doing wrong?
Jeremy
|
|
|
Re: GridCtrl and CellJoin problems [message #27834 is a reply to message #27833] |
Thu, 05 August 2010 22:48 |
jeremy_c
Messages: 175 Registered: August 2007 Location: Ohio, USA
|
Experienced Member |
|
|
I got it. The left and right indexes are 1 based, not zero based it seems
needs.AddColumn("Need", 3).HeaderAlignCenter().AlignLeft(); // 1
needs.AddColumn("Band", 1).HeaderAlignCenter().AlignCenter(); // 2
needs.AddColumn("BandL", 1).HeaderAlignCenter().AlignCenter(); // 3
needs.AddColumn("BandE", 1).HeaderAlignCenter().AlignCenter(); // 4
needs.AddColumn("BandQ", 1).HeaderAlignCenter().AlignCenter(); // 5
needs.AddColumn("Mode", 1).HeaderAlignCenter().AlignCenter(); // 6
needs.AddColumn("ModeL", 1).HeaderAlignCenter().AlignCenter(); // 7
needs.AddColumn("ModeE", 1).HeaderAlignCenter().AlignCenter(); // 8
needs.AddColumn("ModeQ", 1).HeaderAlignCenter().AlignCenter(); // 9
needs.AddRow("","P", "L", "E", "Q", "P", "L", "E", "Q");
needs.SetFixedRows(2);
needs.JoinFixedCells(1, 0, 1, 1);
needs.JoinFixedCells(2, 0, 5, 0);
needs.JoinFixedCells(6, 0, 9, 0);
needs.ColorCols();
Thanks for the great control!
Jeremy
-
Attachment: needs.png
(Size: 8.87KB, Downloaded 558 times)
[Updated on: Thu, 05 August 2010 22:49] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 06:06:06 CEST 2024
Total time taken to generate the page: 0.03413 seconds
|