Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

row disappears from grid

Status
Not open for further replies.

gjbroek

Technical User
Jun 1, 2005
10
NL
Hi,

I have a grid with only 2 columns. All works fine, except for one thing.

When browsing the grid using the arrow keys, column1 disappears from my grid when I use the left arrow key. Only column2 remains visible (displayed on the position of column1). I cannot make column1 visible again (except by restarting the program).

What can cause this behaviour?

Regards, Gerrit
 
What happens when you press LEFT again. Did the column appears again?

To avoid this stupid behaviuor of the grid make sure that
(Column1.Width+Column2.Width+...ColumnN.Widht) < Grid.Width-WidthfOfTheVerticalScrollBar

i.e If the (grid.Width-WidthfOfTheVerticalScrollBar) = 500 make sure that Colum1.Width+Colum2.Width == 499 or something smaller :eek:)))

Borislav Borissov
 
You may add these lines in the AfterRowColChange-Event of the Grid:

Code:
LPARAMETERS nColIndex

IF THIS.LEFTCOLUMN >1
   THIS.DOSCROLL(4)
   THIS.REFRESH()
ENDIF

The soultion to make your Columns narrow enough is much more beautiful, as this will result in a flicker, if the column1 scrolls out of sight.

Bye, Olaf.
 

Gerrit,

Borislav is right.

You'll probably need to use a bit of trail and error to get it just right. Just keeping making the columns a little bit smaller until the horizontal scrolling disappears, but not so much that you see a big white space to the right of the last column.

I hate this behaviour, but I guess we're stuck with it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top