Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Commands

Status
Not open for further replies.

lashwarj

IS-IT--Management
Nov 1, 2000
1,067
US
I have a table owner_info with the fields ownderid, f_name, l_name, address.


How would I create my own buttons (EX. NEXT, PREVIOUS, ADD, SAVE)
 
I will assume you have a form?
Modify your form and from the form control toolbar, just drag the commanbuttons to the form and change the caption.
Or is this a trick question and I'm missing something...
 
Actually you should create your own navigation bar as a class and use it whenever you need one. Of course there are navigation classes available in the samples which come with VFP, and they should be consulted as to how to code them, but they tend to have a lot of stuff you don't need or want. Just start with a command group, or a container or shape or whatever and add buttons as you want and then save the whole thing as a class and work from there. You might want to stick an textbox in the middle to display the record number or allow the user to enter one for use with a search button. Dave Dardinger
 
Remember, tryu not to code all your navigation code in the command button itself and especially not in the click event. You;ll regret it once you wish to change things by f.i. moving controls about.

Te best thing to do is create a class that handles data navigation with methods like: First, last, prev, next, save, cancel.
Call this class and its method from your navigation buttons.

In my crownbase application I created a business object that handles all those things. Just have a look at it it might give you a good hint.

(See link below)
It is located in:
Classlibrary: busobj_lib
Class: bu_obj.

HTH,
Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top