Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dockable Forms
Message
De
28/09/2012 16:51:34
 
 
À
28/09/2012 14:47:38
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01553804
Message ID:
01553900
Vues:
107
This message has been marked as the solution to the initial question of the thread.
>>>>>>I have a pair of dockable forms. Using the mouse, I am able to dock both forms on the same side of the screen, one on top of the other. Is there a way to programatically dock both forms in the same position. All I can find is the Dock method, calling the dock method of each form with 1 causes the forms to dock NEXT to each other NOT stacked. What I am attempting to do is to restore how the user has configured the forms when they are relaunched between sessions. Any ideas?
>>>>>>
>>>>>>Thanks
>>>>>
>>>>>I think you need to use 4 as first parameter, and then specify the window you want to dock it with as the second parameter.
>>>>
>>>>Using 4 causes the two windows to be tab docked, basically one overlaying the other, with tabs at the bottom to allow switching. What I am trying to achieve is for each form to take half of the screen height and dock to the same "edge" of the screen. Thanks for the try.
>>>
>>>To get what you want, you'll need two DOCK WINDOW commands, I think:
>>>
>>>* First, link dock the two windows
>>>DOCK WINDOW MyForm1 POSITION 0 WINDOW MyForm2
>>>
>>>* Then, dock the combination to the right
>>>DOCK WINDOW MyForm1 POSITION 2
>>>
>>>Tamar
>>
>>Hi Tamar,
>>
>>I thought the DOCK command is not supported during runtime. I will give it a try. I did notice that if I simply undock one form, then double click the title bar of the form it is restored to the correct position. So... that gives me hope that it is possible, if Foxpro can do it internally then I must be able to do it programatically, I just don't know how yet.
>
>Just tried it out and...... DOCK command works perfectly.... only problem is it does not work in the runtime version. Any command exactly like the DOCK command that works in the runtime?

Sorry, wasn't paying enough attention to the question. Use the Dock method, and use the optional second parameter.

Assuming o1 and o2 are object refs to your forms:
o1.Dockable = 1
o2.Dockable = 1
o1.Dock(0,o2)
o1.Dock(1)
Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform