Recent

Author Topic: [SOLVED] Stringgrid with different width at different columns  (Read 5319 times)

oproescu

  • New Member
  • *
  • Posts: 48
[SOLVED] Stringgrid with different width at different columns
« on: November 23, 2017, 04:05:38 pm »
Hallo!
How can be made a stringgrid table to permanently have different widths in different columns?
Many thanks!
« Last Edit: November 26, 2017, 07:14:15 am by oproescu »

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: Stringgrid with different width at different columns
« Reply #1 on: November 23, 2017, 05:34:49 pm »
TStringGrid have a property called Columns, you need to add a column for each column you
have, in those, you can set the width and other various items for that column
The only true wisdom is knowing you know nothing

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Stringgrid with different width at different columns
« Reply #2 on: November 23, 2017, 06:02:57 pm »
Code: Pascal  [Select][+][-]
  1.   //change the width of the 3rd column to 150.
  2.   StringGrid1.ColWidths[2] := 150;
  3.  
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

oproescu

  • New Member
  • *
  • Posts: 48
Re: Stringgrid with different width at different columns
« Reply #3 on: November 24, 2017, 09:00:22 am »
Thank you taazz, it goes!

 

TinyPortal © 2005-2018