Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command Button
Message
From
25/10/2005 04:36:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/10/2005 04:27:16
Chandan Chakraborty
Bangiya Gramin Vikash Bank
Raiganj, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01061773
Message ID:
01061774
Views:
8
>Hai All!
>
>In form wizard the add command button and save command buttons are in the same position but activating alternatively. How I can do this in my form without using form wizard.
>
>Chandan
PUBLIC oForm
oForm = CREATEOBJECT('myForm')
oForm.Show

define class myForm as Form
add object myButton as CommandButton ;
 with Caption = '\<Add',Height=30,Width=50

Procedure myButton.Click
if this.Caption = '\<Add'
 * code to execute on 'add'
 MESSAGEBOX("Adding...")
 this.Caption = '\<Save'
else
 * code to execute on 'save'
 MESSAGEBOX("Saving...")
 this.Caption = '\<Add'
endif
endproc
enddefine
However having a form level (or commandgroup level) property like AddMode,EditMode is better IMHO.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform