Nirlan Posted November 14, 2013 Share Posted November 14, 2013 Quando eu altero o tamanho da fonte de letra do título de uma coluna no dbgrid, eu recebo a mensagem de erro "Cannot call method 'setStyle' of undefined", conforme imagem em anexo. Alguém também já passou por isso ? Quote Link to comment Share on other sites More sharing options...
fcarvalho4 Posted November 14, 2013 Share Posted November 14, 2013 Deve ser feito no evento DrawColumnCel. Segue exemplo abaixo procedure TfrmGridInsereAltera.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);begin Column.Title.Font.Size := 10; Column.Title.Font.Color := clBlue; Column.Title.Font.Style:=[fsBold]; if ACol=0 then begin Attribs.Color:=clLtGray; Attribs.Font.Style:=[fsBold]; Column.Title.Font.Size := 9; Column.Title.Font.Color := clRed; Column.Title.Font.Style:=[fsBold]; end;end; Espero que resolva. Quote Link to comment Share on other sites More sharing options...
Nirlan Posted November 17, 2013 Author Share Posted November 17, 2013 resolveu sim, muito obrigado. Quote Link to comment Share on other sites More sharing options...
paulojuniordr Posted October 1, 2014 Share Posted October 1, 2014 Me ajudou também, obrigado! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.