* * *

Author Topic: Stringgrid invisible column  (Read 1979 times)

Timewarp

  • New member
  • *
  • Posts: 13
Stringgrid invisible column
« on: September 06, 2010, 01:06:23 pm »
Hello!

Stringgrid1.colwidths[n]:=-1; is not supported?

Only solution IFDEF? (Delphi: 0 and -1 are not the same)

After changing (to smaller widths) necessary to manually call stringgrid1.repaint; (or .invalidate;)

Ocye

  • Full Member
  • ***
  • Posts: 197
    • Scrabble3D
Re: Stringgrid invisible column
« Reply #1 on: September 06, 2010, 07:45:43 pm »
To make a column invisible use the columns editor and set the property there. Or do it manually with Columns[1].Visible:=false;. I believe it's not possible (or at least it should not) to have no columns.
x86_64-linux-qt, Lazarus 0.9.31 (SVN), FPC 2.6.0

Timewarp

  • New member
  • *
  • Posts: 13
Re: Stringgrid invisible column
« Reply #2 on: September 10, 2010, 06:29:14 pm »
Thanks for answer. I'm interested in keeping my project Delphi compatible. There is no columns property in Delphi, only way is to set colwidth -1

jesusr

  • Sr. Member
  • ****
  • Posts: 332
Re: Stringgrid invisible column
« Reply #3 on: September 11, 2010, 01:40:20 am »
what you want to do?, what does delphi with width=0 and with width=-1?

if you want to make a column invisible set it's with to 0. For lazarus grids, any value < 0 means to use a default column width.

Timewarp

  • New member
  • *
  • Posts: 13
Re: Stringgrid invisible column
« Reply #4 on: September 11, 2010, 08:03:14 am »
If 0 in Delphi, then column border is still visible. -1 all gone. I'll use ifdef.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads