Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keep a 4-row grid from scrolling?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00045393
Message ID:
00045597
Vues:
37
>>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?
>
>You can add some code to the Scrolled event of the grid. If the user tries to scroll the grid you can detecct it and take action to restore the grid. The scrolled event give you a direction parameter so you can handle the user trying to scoll both vertically and horizontally

What properties could I set to keep the top row and left columns from changing? The ActiveRow, ActiveColumn,LeftColumn,RelativeColumn and RelativeRow are all Read-only at Runtime.

Do you have any examples?

thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform