Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Member Classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00778617
Message ID:
00779241
Views:
15
>But why if I use the vfp base classes from the toolbox works fine?
>I can drop a page into a pageframe.
>What's the differens?

The difference is that there's special handling in the Toolbox for this case, where the normal toolbar works as it does for all the other controls.

From EDITSOURCE("c:\program files\microsoft visual foxpro 8\tools\vfpsource\toolbox\_toolbox.vcx", 293, "_root", "dropObject") (Assuming you've unzipped the xSource.zip the same place I did...) :
CASE oDropTarget.BaseClass == "Page" AND m.cBaseClass == "Page"
   TRY
      IF UPPER(oDropTarget.Parent.MemberClassLibrary) == UPPER(m.cClassLib) AND ;
        (UPPER(oDropTarget.Parent.MemberClass) == UPPER(m.cClassName) OR  (EMPTY(NVL(oDropTarget.Parent.MemberClass, '')) AND UPPER(m.cClassName) == "PAGE"))
         * if the MemberClass is already set, then simply increase the page count
         oDropTarget.Parent.PageCount = oDropTarget.Parent.PageCount + 1
      ELSE
         IF MESSAGEBOX(MEMBERCLASS_WARNING_LOC, MB_ICONQUESTION + MB_YESNO + MB_DEFBUTTON2, TOOLBOX_LOC) == IDYES
            m.oParent = m.oDropTarget.Parent
            m.oDropTarget = .NULL.
            m.oTopObject  = .NULL.
								
            * release now because we can't change the parent
            * MemberClass properties if we have references to
            * the child page
            RELEASE m.oDropTarget
            RELEASE m.oTopObject

            oParent.MemberClassLibrary = m.cClassLib
            oParent.MemberClass        = m.cClassName
            oParent.PageCount          = 1
         ENDIF
      ENDIF
   CATCH TO oException
   ENDTRY
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform