Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview disappearing
Message
De
06/04/2009 16:00:04
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Treeview disappearing
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Divers
Thread ID:
01393540
Message ID:
01393540
Vues:
124
Hi for all!
Just for the record, I'm using VFP 9 SP1.

Run the following code and you'll see that in page2 there is a treeview control.
Now, click in the page1 tab and click in the page2 tab again.
You'll don't see the treeview control.
But if you click inside the page2, treeview will be displayed.
Anyone could help me to solve this issue?

Thanks a lot!
With _Screen
   .AddObject("Pageframe","myPageframe")
   With .PageFrame
      .PageCount = 2
      With .Pages(1)
         .Caption = "page1"
         .AddObject( "cmdExit", "cmdExit" )
         .cmdExit.Visible = .T.
      Endwith
      With .Pages(2)
         .Caption = "page2"
         .AddObject( "cntTreeview", "cntTreeview" )
         .cntTreeview.Anchor = 0
         .cntTreeview.Height = .Parent.Height
         .cntTreeview.Width = .Parent.Width
         .cntTreeview.oleControl1.Nodes.Add( , 1, "Session", "First Option" )
         .cntTreeview.oleControl1.Nodes.Add( , 1, "OptionSession", "Second Option" )
         .cntTreeview.Anchor = 15
         .cntTreeview.Visible = .T.
      Endwith
   Endwith

   .PageFrame.Visible = .T.
   .PageFrame.ActivePage = 2
Endwith

Define Class myPage As Page
Enddefine

Define Class myPageframe As PageFrame
   MemberClassLibrary = Sys(16)
   MemberClass = 'myPage'
Enddefine

Define Class cntTreeview As Container
   Add Object oleControl1 As oleTreeview
   Procedure Resize
      DoDefault()
      With This
         .oleControl1.Height = .Height
         .oleControl1.Width = .Width
         .oleControl1.Visible = 1
      Endwith
   Endproc
Enddef

Define Class oleTreeview As OleControl
   OleClass = "MSComctlLib.TreeCtrl.2"
Enddefine

Define Class cmdExit As CommandButton
   Caption = "Exit"
   Height = 50
   Width = 50
   Procedure Click
      _Screen.RemoveObject("Pageframe")
   Endproc
Enddefine
Emerson Santon Reed
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform