* * *

Author Topic: [SOLVED] Navigating in a String Grid.  (Read 508 times)

Hopestation

  • Full Member
  • ***
  • Posts: 148
[SOLVED] Navigating in a String Grid.
« on: February 10, 2018, 06:20:17 pm »
Hi.

I am using a String Grid to display data in a csv file.

There are more rows of data than displayed rows in the grid, so I have a vertical scrollbar.

When I use a dbGrid I can use a dbNavigator component to move to either end of my data rows or step up and down individual rows.

I can't find a way to do the same with a String Grid.

I tried using StringGrid.Row := 1 to got to the first row but If I am scrolled to the bottom of the data nothing happens.

If this worked I could make a simple StringGrid Navigator.

Is there an obvious answer that I am missing?
« Last Edit: February 10, 2018, 06:44:37 pm by Hopestation »

josh

  • Hero Member
  • *****
  • Posts: 554
Re: Navigating in a String Grid.
« Reply #1 on: February 10, 2018, 06:36:59 pm »
will .toprow help?
stringgrid.toprow:=10;
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

Hopestation

  • Full Member
  • ***
  • Posts: 148
Re: Navigating in a String Grid.
« Reply #2 on: February 10, 2018, 06:44:04 pm »
So it was obvious.

Thanks for your help.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus