Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Container based-class in grid.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00200193
Message ID:
00200199
Vues:
11
>>>>I have created a container based class which uses a textbox and a button to allow users to use a lookup function to fill in a value. I have tried using this in a grid and am having some problems. I can make it work if I set sparse to .F., but I only want to show the search button in the active cell. If I set sparse to .T., then it works right but the non-active cells show no values.
>>>>I tried making it so that my button was invisible until the control got focus, but the results of that were just plain weird. Once I clicked on one cell in that column, every cell in that column showed up with a button. Clicking on a different cell in any row would then cause the button to go back to invisible, but basically it was just weird.
>>>>
>>>>My real question: how can I use a container class with sparse = .t. and still see the values in non-active cells.
>>>>
>>>>Thanks in advance,
>>>>Paul R. Moon
>>>
>>>Paul, you cannot make your container be visible in all cells with .sparse = .t.
>>>As I understand, you want to see the textbox AND a button in the active cell, and only textbox in all other cells in the same column. If that is right, you can place in the grid column TWO controls - one is your container, - another just a textbox (bound to the same field). Set Column.Sparse = .f. Then set the condition for Column.DynamicCurrentControl the way you will see your container only in active row.
>>>
>>>Nick
>>
>>I though about that, but I don't want the extra column. I don't want to see my container in all cells, I don't even want to see a part of it. I want to see the default grid display. That is why I have sparse set to .t.
>>The problem is that it doesn't show anything in the cells of that column, except in a the active cell.
>>
>>Any ideas?
>
>I am not talking about 2 columns, what I am saying is 2 controls in the same column.

Got it. I read that wrong.
So now I've got two controls in my column, pickcombo1 and text1. I am looking at column1.dynamiccurrentcontrol, and trying to think of a good way to check if I am on the active cell. Any ideas?
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform