Recent

Author Topic: [SOLVED] String Grid shifts left and won't move back.  (Read 3116 times)

Hopestation

  • Full Member
  • ***
  • Posts: 181
[SOLVED] String Grid shifts left and won't move back.
« on: January 03, 2017, 10:58:20 am »
Hi.

I am using Lazarus 1.6.2.

I have a String Grid with 4 columns.

When I run the program and click in the right hand column the columns shift left one column, leaving a blank space on the right. Once they have moved it is impossible to get the left hand column back.

I have tried setting the AutoAdvance property to aaNone but it hasn't helped.

Is this a fault in the component or have I missed a setting?

Thanks.
« Last Edit: January 03, 2017, 12:09:11 pm by Hopestation »

JZS

  • Full Member
  • ***
  • Posts: 205
Re: String Grid shifts left and won't move back.
« Reply #1 on: January 03, 2017, 12:02:10 pm »
If possible just attach a screenshot to make it clear. I will try to help before seeing your component properties and codes.

Normally this happens when the width of the StringGrid is less than, or barely equals to, the width of the columns.

So if the bottom slide bar is visible just slide to the left and your hidden column will appear.
If it is the case, fixing this is simple, just give enough room and make the width big enough to contain the columns plus margin for the side slide bar.
I use recent stable release

Hopestation

  • Full Member
  • ***
  • Posts: 181
Re: String Grid shifts left and won't move back.
« Reply #2 on: January 03, 2017, 12:08:41 pm »
I tried a new application with just a String Grid.

I got the same problem with AutoFillColumns set to False.

When I set AutoFillColumns to True the problem went.

Returning to my original program I set AutoFillColumns to True and the problem went.

Setting it back to False didn't make a difference, the problem has gone.

While I was writing this JZS sent an answer which explains the problem: once I set  AutoFillColumns to True there was no overlap.

Thanks JZS


 

TinyPortal © 2005-2018