Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keep a 4-row grid from scrolling?
Message
From
19/08/1997 19:57:05
 
 
To
19/08/1997 13:48:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00045393
Message ID:
00045710
Views:
38
>>>>I have a grid with four rows and five columns. All cells for all records are always visible so there's no need to scroll in any direction.
>>>>
>>>>When the user moves to the bottom row using the arrow keys, the grid scrolls down one row. Also, since this grid only (always) has four records, the new bottom row is always blank.
>>>>
>>>>I have this same problem moving the cursor to the far right column, the grid scrolls to the left. This is handled by making the grid about two pixels wider than the columns actually require. It's ugly, but it works. Unfortunately, the same approach does not work for vertical scrolling.
>>>>
>>>>I have created a very crude work-around but there has to be a better way. I had to extend the grid to five rows and hide the bottom row behind an empty label control that has the same background color as the form.
>>>>
>>>>Any ideas?
>>>
>>>Personally, I don't see a problem if users will see one more empty line on bottom of a grid. For example, nobody complains that Windows Explorer shows empty space on bottom, if number of files is too less to be scrolled. Also note, that sophisticated user could resize width of row and your problem will reappear.
>>
>>Thanks... but...
>>
>>The grid in question is _only_ four rows tall. It is not full screen, it is on one page of a wizard and only displays four rows. So if the grid scrolls, the top record is no longer visible. I've used grids in other forms where this was not a problem, but I must keep all four rows visible as the user moves around in the grid.
>>
>>But, you do raise another interesting question. The 'AllowRowSizing' and 'AllowHeaderSizing' properties don't seem to work. I've set them both to false and I can still resize the grid.
>>
>>Thanks
>
>VFP3 doesn't have AllowRow/HeaderSizing properties and here I used once MouseMove and/or MouseUp events to catch user's attempt to resize. Putting code like This.RowHeight=Thisform.PermanentRowHeight will do the trick.

Thanks, I'll try that
Previous
Reply
Map
View

Click here to load this message in the networking platform