Recent

Author Topic: TStringGrid row height to fit resized fonts  (Read 10987 times)

asdf

  • Sr. Member
  • ****
  • Posts: 310
TStringGrid row height to fit resized fonts
« on: December 04, 2010, 12:46:04 pm »
If we increase/decrease the font size of the StringGrid, what is the technique to automatically adjust the row height of such StringGrid ?
Lazarus 1.2.4 / Win 32 / THAILAND

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: TStringGrid row height to fit resized fonts
« Reply #1 on: December 04, 2010, 02:31:49 pm »
Well, you can change the DefaultRowHeight property.

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: TStringGrid row height to fit resized fonts
« Reply #2 on: December 04, 2010, 04:19:51 pm »
Could it be done automatically ?
Lazarus 1.2.4 / Win 32 / THAILAND

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: TStringGrid row height to fit resized fonts
« Reply #3 on: December 04, 2010, 04:32:01 pm »
Do you want to change font at run time?

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: TStringGrid row height to fit resized fonts
« Reply #4 on: December 04, 2010, 05:44:57 pm »
Yes, like we got it in using MS Excel.

Now I used new stringgrid1.font.size * 20 div 8.
20 is DefaultRowHeight and 8 is default font.size .
Is it so disgusting ?
Lazarus 1.2.4 / Win 32 / THAILAND

 

TinyPortal © 2005-2018