Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Dynamic Caption
Message
 
À
10/03/2006 09:10:00
Luis Navas
Independent Consultant
Auckland, Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01103071
Message ID:
01103145
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
>Hi to all.
>
>I need your help with this:
>
>I have a grid, I added one column with a commandbutton, sparse =.F., this column is not bound to data, I want to show diferent captions in the commandbutton depending if an object exists in the parent container of the grid. I also try the dynamic current control property to change the current object of the column but with no luck. Any help will be appreciated
>
>Thanks in advance.
>
>Luis Navas

Create a subclass of your button and place it in a container. Then add the backstyle_access method for the backstyle property of the container. In that backstyle_access method then do your check for criteria that effects the contained button's caption. Heck you might even be able to get away with using just a button subclass that has a backcolor_access method and forego the container, but I haven't tried that. I do know that the backstyle_access will fire on the container as each visible row is rendered in the grid. So, in the access method you would have something like...

this.button1.caption = ICASE(blah, blah, blah)

Now, somewhere here there has to be a relation to the record otherwise all the button captions will change. What I mean is that you don't have to actually have the button column bound to anything but your ICASE or whatever is going to have to take the current record into consideration... such as some other field in the record that is the name of the control that is being checked for or whatever.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform