I stopped using formsets a long time ago, after I learned how to use forms
with private data sessions. I strongly recommend you to stay away from them.
As for the toolbar question:
I launch a standard VFP menu from a top level form which, in turn, launches
a persistent toolbar when it is instantiated. This toolbar is available to
all forms in the system. These forms derive from a class that contains
methods that would interact with the toolbar in this manner:
Say you launch an edit form for customers and are in the process of adding a
record. In this case, the toolbar, which has add,delete,cancel,save, etc
buttons, will have the add button disabled and the cancel and save buttons
enabled. But if the user wants to launch another form while editing the
customer record, say he wants to add a salesperson to the salespersons
table, the moment his salespersons edit form is instantiated, the toolbar
should show the buttons in a manner that will enable the second form to be
edited. When focus passes back to the first form, the toolbar should regain
its state, ie, with the add button disabled and the cancel and save buttons
enabled, etc.
I do this by using an array in all edit forms that keeps the status of each
button in the toolbar, when the form instantiates, when it is activated and
when it is deactivated.
So, by using this array I can get the toolbar to be geared to the particular
form being in focus. It is a bit complicated to set up, but once you have
it, it works like a charm.
Here is a snippet of the code I put in the top level form activate method
that launches the menu and the toolbar:
If this.lFirstTime = .t.
this.lFirstTime = .f.
this.LockScreen = .t.
Do general.mpr with this,.t.
If Vartype(this.oToolBar) <> "O"
this.oToolBar = createobject("myToolBar")
this.oToolBar.dock(0)
this.oToolBar.show()
endif
this.LockScreen = .f.
EndIf
Rafael Copquin
www.copquin.com.ar
Universal Thread Magazine - Translation Coordinator
Treasurer - Microsoft Users Group of Argentina (MUG)
www.mug.org.ar
----- Original Message -----
From: "Kevin O'Shea" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 20, 2006 1:05 PM
Subject: Toolbar Menus
I am looking for some input on using a toolbar as a menu within a
formset. When I say menu here, it is not a conventional drop down menu
but more of a button based menu system.
The menu needs to be universally accessible in the application,
including when modal forms are shown in the formset. I believe that
using a toolbar will accomplish being able to access it when modal forms
are displayed.
I have mocked up a toolbar but I would like to hide the dragable image
line displayed on the left of the toolbar when it is docked, as I do not
wish to make the toolbar movable and I would like it to blend in better
with the forms below - i.e. be right aligned with the forms.
Any input is appreciated.
Thanks,
Kevin
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.