![]() |
Прежде чем задать вопрос, смотрите FAQ.
Рекомендуем загрузить DRKB.
![]() |
APAL |
![]()
Сообщение
#1
|
![]() Смотрю... ![]() ![]() ![]() ![]() ![]() Группа: Модераторы Сообщений: 1 055 Пол: Мужской Реальное имя: Пшеничный Алексей Анатольевич Репутация: ![]() ![]() ![]() |
Подскажите как изменить (пример - сделать жирным) текст в заголовках колонок таблицы TStringGrid?
Нашел вроде бы Tabl.Cells.Canvas.Font.Style:=[fsBold]; - да не работает... ![]() Сообщение отредактировано: APAL - 12.04.2004 16:50 -------------------- |
![]() ![]() |
KRUTOY |
![]()
Сообщение
#2
|
![]() Пионер ![]() ![]() Группа: Пользователи Сообщений: 68 Пол: Мужской Репутация: ![]() ![]() ![]() |
Попробуй этот код!!!!!! МОжно даже разными цветами!!
я думаю,для себя приспособишь... в цикле if...then параметр смени; запускай,кликай по Stringgrid-у ![]() Код type TForm1 = class(TForm) StringGrid1: TStringGrid; procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); procedure StringGrid1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); const CharOffset = 3; begin with StringGrid1.canvas do begin if State=[gdFixed]then begin font.color := clMaroon; font.Style:=[fsBold]; textout(rect.left + CharOffset, rect.top + CharOffset, 'Lloyd'); font.color := clNavy; font.Style:=[]; textout(rect.left + CharOffset + TextWidth('L'), rect.top + CharOffset, 'loyd'); end else end; end; procedure TForm1.StringGrid1Click(Sender: TObject); begin Stringgrid1.Font.Style:=[]; Stringgrid1.Cells[2,2]:='kruto'; Stringgrid1.Cells[3,3]:='офонареть'; end; end. Сообщение отредактировано: KRUTOY - 21.04.2004 19:33 -------------------- Главное - чтобы воля была, к победе...
|
![]() ![]() |
![]() |
Текстовая версия | 24.06.2025 6:07 |