Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Khozema Adenwala
  Where is Khozema Adenwala?
 sanaa
 Yemen
 Khozema Adenwala
 Tags
Subject: RE: Command Button Caption in grid column
Thread ID: 50816 Message ID: 50825 # Views: 2 # Ratings: 0
Version: Visual FoxPro 7 Category: Grids
Date: Monday, September 06, 2004 12:49:29 PM         
   


Hi Khozema

> I have a grid with a command button set as a current control for a column
> Now I want the caption of this button to be the same as the field value for that record.

I am pretty sure that you cannot do this directly.

The problem is that a grid only has one "real" row at any time, and 'Caption' is a static property, not a dynamic one, so anything that simply evaluates the field value will always show only the first value.

About the only way I can think of to do this would be to use a textbox class that is colored to look like a button and then use the Click event of the TextBox.

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Akron, OH, USA

ENTIRE THREAD

Command Button Caption in grid column Posted by khozema adenwala @ 9/6/2004 11:44:32 AM
RE: Command Button Caption in grid column Posted by Andy Kramek @ 9/6/2004 12:49:29 PM
RE: Command Button Caption in grid column Posted by Forizzo @ 3/7/2005 4:42:22 PM
RE: Command Button Caption in grid column Posted by Vincent Byrne @ 3/7/2005 9:19:49 PM