Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl column width simple question
|
Re: GridCtrl column width simple question [message #21059 is a reply to message #21056] |
Wed, 29 April 2009 11:47 |
|
Please turn off column repainting when adding columns:
void Grid_Write(int row, int col, char *str)
{
grid.Ready(false);
if (row > grid.GetRowCount()-1) {
for (int i = grid.GetRowCount(); i < row+1; ++i)
grid.AddRow("", 100);
}
grid.Ready(true);
}
This must be done only in Proportional mode and only if you're adding columns when grid is visible.
[Updated on: Wed, 29 April 2009 11:48] Report message to a moderator
|
|
|
Re: GridCtrl column width simple question [message #21060 is a reply to message #21059] |
Wed, 29 April 2009 13:06 |
|
koldo
Messages: 3358 Registered: August 2008
|
Senior Veteran |
|
|
Hello unodgs
Almost ok. Now I initialize the grid with:
that is Absolute mode, and it works:
grid.Ready(false);
if (col > grid.GetColumnCount()-1) {
for (int i = grid.GetColumnCount(); i < col+1; ++i)
grid.AddColumn("", 100);
}
tabGrid->grid.Ready(true);
Best regards
Koldo
Best regards
Iñaki
|
|
|
Goto Forum:
Current Time: Mon Apr 29 08:52:16 CEST 2024
Total time taken to generate the page: 0.03148 seconds
|