Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl and CellJoin problems
GridCtrl and CellJoin problems [message #27833] Thu, 05 August 2010 21:23 Go to next message
jeremy_c is currently offline  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 Go to previous messageGo to next message
jeremy_c is currently offline  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 Smile

index.php?t=getfile&id=2704&private=0

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 315 times)

[Updated on: Thu, 05 August 2010 22:49]

Report message to a moderator

Re: GridCtrl and CellJoin problems [message #27903 is a reply to message #27834] Tue, 10 August 2010 09:19 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3030
Registered: August 2008
Ultimate Member
Oh, it is pretty. I will have to use it! Smile

Best regards
IƱaki
Re: GridCtrl and CellJoin problems [message #29638 is a reply to message #27833] Fri, 05 November 2010 08:27 Go to previous message
coolman is currently offline  coolman
Messages: 47
Registered: April 2006
Location: Czech Republic
Member
Hi,

I would like to ask you if it is possible to sort columns by P, Q, E, L?

Thank, Radek
Previous Topic: VirtualArrayCtrl embedded Ctrls
Next Topic: GridCtrl changed add row behavior
Goto Forum:
  


Current Time: Fri Nov 15 04:39:45 CET 2019

Total time taken to generate the page: 0.01699 seconds