Recent

Author Topic: To StringGrid1.AutoSizeColumns; temporarily  (Read 5097 times)

asdf

  • Sr. Member
  • ****
  • Posts: 310
To StringGrid1.AutoSizeColumns; temporarily
« on: February 06, 2011, 05:19:54 pm »
Using StringGrid1.AutoSizeColumns; - This makes columns of StringGrid1 AutoSizeColumns at all times.

I need to use it only once, what is the code to release StringGrid.AutoSizeColumns;  %) ?
Lazarus 1.2.4 / Win 32 / THAILAND

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: To StringGrid1.AutoSizeColumns; temporarily
« Reply #1 on: February 06, 2011, 05:30:18 pm »
I don't understand.

For me works as expected. It autosizes Columns only once and I  have to call it again if I want autosize again.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: To StringGrid1.AutoSizeColumns; temporarily
« Reply #2 on: February 06, 2011, 05:46:04 pm »
Very strange for me, after StringGrid1.AutoSizeColumns - I could not adjust its individual .ColWidths  :o .
Lazarus 1.2.4 / Win 32 / THAILAND

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: To StringGrid1.AutoSizeColumns; temporarily
« Reply #3 on: February 06, 2011, 05:55:44 pm »
I think problem will be in your grid properties.

Is your StringGrid.Options.goColSizing set to True ?

At me it is set to True and I can adjust Column.Width by mouse and also from code.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: To StringGrid1.AutoSizeColumns; temporarily
« Reply #4 on: February 06, 2011, 06:11:52 pm »


You are right, in a plain sample project - it is as you has described.
But I really have placed .AutoSizeColumns at the end of procedure.

I have to check up my codes.
« Last Edit: February 06, 2011, 06:26:04 pm by asdf »
Lazarus 1.2.4 / Win 32 / THAILAND

 

TinyPortal © 2005-2018