* Changes the horizontal alignment of the text in the list. This doesn't change * the alignment of existing text, just the alignment of text added from then on. * @param align Horizontal alignment. * @param col the column to set the alignment for (defaults to -1, meaning "all") */
| 524 | * @param col the column to set the alignment for (defaults to -1, meaning "all") |
| 525 | */ |
| 526 | void TextList::setAlign(TextHAlign align, int col) |
| 527 | { |
| 528 | if (col == -1) |
| 529 | { |
| 530 | for (size_t i = 0; i <= _columns.size() - 1; ++i) |
| 531 | { |
| 532 | _align[i] = align; |
| 533 | } |
| 534 | } |
| 535 | else |
| 536 | { |
| 537 | _align[col] = align; |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * If enabled, the text in different columns will be separated by dots. |