Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: James Stewart
  Where is James Stewart?
 Christchurch
 New Zealand
 James Stewart
 To: James Stewart
  Where is James Stewart?
 Christchurch
 New Zealand
 James Stewart
 Tags
Subject: RE: Assigning to command buttons
Thread ID: 33807 Message ID: 33808 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Forms
Date: Wednesday, December 03, 2003 9:06:37 PM         
   


**** EDIT *****

> I have a form with 20 buttons on it, each button needs to have a value attached to it by the user at runtime. The value will be the indentifier of the item in the "inventory" type of table. The user MUST have the ability to change the button value (and label) when ever they wish.

The user enters this into the inventory table, and when the form opens it checks for the number of items and only displays the number of buttons required.

> What is the best way to change the caption and "action" of the button? This is what i thought i could use, however i have run into problems using the "lccmd" variable.
>
>
lnnum = recno("lv_invent_chk")
> lnchk = 1
> lccmd = "cmd" + str(lnchk)
> 
> Do while lnchk <= lnnum
> thisform.lccmd.caption = lctitle
> lnchk = lnchk + 1
> loop
> enddo
> 

>
> Cheers
> James
> Have you been foxed today?
> I have :-) !


Have you been foxed today?
I have :-) !

ENTIRE THREAD

Assigning to command buttons Posted by James Stewart @ 12/3/2003 9:03:45 PM
RE: Assigning to command buttons Posted by James Stewart @ 12/3/2003 9:06:37 PM
RE: Assigning to command buttons Posted by James Stewart @ 12/4/2003 2:50:00 AM
RE: Assigning to command buttons Posted by Jamie Osborn @ 12/4/2003 3:47:18 AM
RE: Assigning to command buttons Posted by James Stewart @ 12/4/2003 10:02:40 AM