Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Form Buttons
Message
From
02/11/1999 18:40:12
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00285790
Message ID:
00285838
Views:
16
>>>>What's the easiest way to put a "save to database" button and a "cancel" button on a form?
>>>>
>>>>JD
>>>
>>>As far as the buttons go, it's very easy, just drop them on your form or wherever, and place the appropriate code behind them in the click event. Don't forget to set an appropriate caption for them. 8') You might also want to set the Default property to true for the save button, and the Cancel property to true for the cancel button.
>>>
>>>As for the code, that is up to you. It really depends on whether or not you are using views. IOW, it depends on your implementation as to how you do the save and cancel. For example: If you are using views, I would be willing to bet that you would need to call TABLEUPDATE somewhere from the save button, and you would need to call TABLEREVERT somewhere from the cancel button.
>>>
>>>If it were me, I would create a class for each of these buttons so that I could just drop them on the form.
>>
>>Doug,
>> I'm not quite to the classmaking level yet, but can't wait to get there. I can already see how important it is. Is there some information on it somewhere on the Thread?
>>
>>Thanks,
>>JD
>
>Not sure if there is anything on the UT, but I would recommend a good OOP book, preferrably one with VFP in mind. You can probably get several good references just by searching the UT. Select the binoculars icon on the upper left pane to go to the UT search.
>
>HTH


In the component gallery i find buttons, but when i try to use them i get an error to the effect of "oshared is not a function, method, or procedure...."
Has anyone run into this and can you tell me what it means?

Thanks,
JD
Previous
Reply
Map
View

Click here to load this message in the networking platform