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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding the TABLE menu of fox to a form with grid

Status
Not open for further replies.

Andre Globensky

Programmer
Mar 11, 2003
22
CA
I'm able to add my own menu to a Form, but is there a way to add the TABLE menu of fox, to manipulate the table loaded on a grid.
Thanks
 
The question is unclear. What exactly you're trying to do?
 
Cut and PAste what you need from this menu into yours.

SET SYSMENU TO
SET SYSMENU AUTOMATIC

DEFINE PAD _MSM_SYSTM OF _MSYSMENU PROMPT "\<File" COLOR SCHEME 3 KEY ALT+F, "ALT+F"
DEFINE PAD _MSM_EDIT OF _MSYSMENU PROMPT "\<Edit" COLOR SCHEME 3 KEY ALT+E, ""
DEFINE PAD _MSM_RECRD OF _MSYSMENU PROMPT "\<Record" COLOR SCHEME 3 KEY ALT+R, ""
ON PAD _MSM_SYSTM OF _MSYSMENU ACTIVATE POPUP mmfile
ON PAD _MSM_EDIT OF _MSYSMENU ACTIVATE POPUP edit
ON PAD _MSM_RECRD OF _MSYSMENU ACTIVATE POPUP _mrecord

DEFINE POPUP mmfile MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF mmfile PROMPT "\<X it" KEY CTRL+X, "^X"
DEFINE BAR _MST_HELP OF mmfile PROMPT "\<Help..." KEY F1, "F1"
DEFINE BAR _MST_MACRO OF mmfile PROMPT "\<Macros..."
DEFINE BAR 4 OF mmfile PROMPT "\-"
DEFINE BAR _MST_CALCU OF mmfile PROMPT "\<Calculator" KEY CTRL+F1, "^F1"
DEFINE BAR _MST_DIARY OF mmfile PROMPT "Calendar/\<Diary" KEY ALT+F1, "@F1"
DEFINE BAR 7 OF mmfile PROMPT "\-"
DEFINE BAR _MFI_SETUP OF mmfile PROMPT "Printer \<Setup..." KEY CTRL+F7, "^F7"
DEFINE BAR 9 OF mmfile PROMPT "\<Report" KEY SHIFT+F7, "!F7" SKIP FOR file(alias()+".FRX") = .f.
DEFINE BAR 10 OF mmfile PROMPT "\<Label" KEY ALT+F7, "@F7" ;
SKIP FOR file(alias()+".LBL") = .f.
ON SELECTION BAR 1 OF mmfile keyboard "{ESC}"
ON SELECTION BAR 4 OF mmfile * remark
ON SELECTION BAR 7 OF mmfile * remark
ON SELECTION BAR 9 OF mmfile do dbffrx
ON SELECTION BAR 10 OF mmfile do dbflbl

DEFINE POPUP edit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _MED_UNDO OF edit PROMPT "\<Undo" KEY CTRL+U, "^U"
DEFINE BAR _MED_REDO OF edit PROMPT "\<Redo" KEY CTRL+R, "^R"
DEFINE BAR _MED_CUT OF edit PROMPT "Cu\<t" KEY CTRL+X, "^X"
DEFINE BAR _MED_COPY OF edit PROMPT "\<Copy" KEY CTRL+C, "^C"
DEFINE BAR _MED_PASTE OF edit PROMPT "\<Paste" KEY CTRL+V, "^V"
DEFINE BAR _MED_CLEAR OF edit PROMPT "Clear"
DEFINE BAR _MED_SLCTA OF edit PROMPT "Select \<All" KEY CTRL+A, "^A"
DEFINE BAR 8 OF edit PROMPT "\-"
DEFINE BAR _MED_FIND OF edit PROMPT "\<Find..." KEY CTRL+F, "^F"
DEFINE BAR _MED_FINDA OF edit PROMPT "Find A\<gain" KEY CTRL+G, "^G"
DEFINE BAR _MED_REPL OF edit PROMPT "R\<eplace And Find Again" KEY CTRL+E, "^E"
DEFINE BAR _MED_REPLA OF edit PROMPT "Replace All"
ON SELECTION BAR 8 OF edit * remark

DEFINE POPUP _mrecord MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _MRC_GOTO OF _mrecord PROMPT "\<Goto..."
DEFINE BAR _MRC_LOCAT OF _mrecord PROMPT "\<Locate..."
DEFINE BAR _MRC_CONT OF _mrecord PROMPT "\<Continue" KEY CTRL+K, "^K"
DEFINE BAR _MRC_SEEK OF _mrecord PROMPT "\<Seek..."
DEFINE BAR _MRC_REPL OF _mrecord PROMPT "Re\<place..."


David W. Grewe(Dave)
 
AGlobensky,

You can display the built-in Table menu, just as you can display most of the so-called system menus. But it won't do you any good.

The Table menu operates on the current Browse window. It does not "manipulate the table loaded on a grid". You will have to provide your own controls for navigating, adding and deleting, resizing partitions, and so forth.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
When you browse a table in fox the menu 'table' comes up.
I want to create a top level form with grid to view a table and add the 'table' menu on the form that i've created, not the main _screen of fox. If not can i load the command window!!
 

I want to create a top level form with grid to view a table and add the 'table' menu on the form that i've created, not the main _screen of fox.

As I just explained, it won't do any good. The Table menu does not let you manipulate the table behind a grid.

If not can i load the command window!!

No. Not while the program is running. Nor would you want to.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mr. Globensky,
if you are talking about the menu build-in FoxPro starting with "Properties" and ending with "Change Partitions". The answer is yes. However you shall have to construct it yourself it is not supplied by MS by my knowledge. It should not be so difficult. In case you are at a total loss to make this I suggest you attach the Wizbtns class these buttons give you practically all the functionality as shown in this menu except for the 'properties', 'font','size field', move field' and 'partition group' options.
Regards,
Jockey2
 
Thanks jockey2, i will look in to it, sorry mike, i started to reply and sent it much later, didn't had the chance to look at your response
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top