Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dockable form and browse
Message
De
21/06/2005 17:28:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01025212
Message ID:
01025283
Vues:
21
>When I have a form that is Dockable but not docked, the browse command makes the form blink but does not browse the table. Is this a bug?
>
>
>
>
>
>PUBLIC o
>o = CREATEOBJECT("myform")
>o.show()
>
>DEFINE CLASS myForm AS FORM
>
>	ADD OBJECT cmdButton1 AS CommandButton WITH top = 10, caption = "Not Dockable"
>	ADD OBJECT cmdButton2 AS CommandButton WITH top = 30, caption = "Dockable"
>	ADD OBJECT cmdButton3 AS CommandButton WITH top = 50, caption = "Docked"
>
>   PROCEDURE cmdButton1.Click
>      SELECT TEST
>      thisform.Dockable= 0
>      BROWSE
>   ENDPROC
>
>   PROCEDURE cmdButton2.Click
>      SELECT TEST
>      thisform.Dockable= 1
>      thisform.Dock(-1)
>      BROWSE
>   ENDPROC
>
>   PROCEDURE cmdButton3.Click
>      SELECT TEST
>      thisform.Dockable= 1
>      thisform.Dock(1)
>      BROWSE
>   ENDPROC
>
>
>	PROCEDURE Init
>		CREATE CURSOR TEST(TEST C(10))
>	ENDPROC
>
>	PROCEDURE Destroy
>		USE IN SELECT("TEST")
>	ENDPROC
>ENDDEFINE
>
>
This is by design.
On BROWSE help:

... If you omit NORMAL, and the current output window is a user-defined window with its own settings, the Browse window assumes those user-defined settings also.
PUBLIC o
o = CREATEOBJECT("myform")
o.show()

DEFINE CLASS myForm AS FORM

	ADD OBJECT cmdButton1 AS CommandButton WITH top = 10, caption = "Not Dockable"
	ADD OBJECT cmdButton2 AS CommandButton WITH top = 30, caption = "Dockable"
	ADD OBJECT cmdButton3 AS CommandButton WITH top = 50, caption = "Docked"

   PROCEDURE cmdButton1.Click
      SELECT TEST
      thisform.Dockable= 0
      BROWSE
   ENDPROC

   PROCEDURE cmdButton2.Click
      SELECT TEST
      thisform.Dockable= 1 
      thisform.Dock(-1)
     BROWSE NORMAL IN WINDOW (WONTOP())
   ENDPROC

   PROCEDURE cmdButton3.Click
      SELECT TEST
      thisform.Dockable= 1 
      thisform.Dock(1)
      BROWSE NORMAL IN WINDOW (WONTOP())
   ENDPROC


	PROCEDURE Init
		CREATE CURSOR TEST(TEST C(10))
	ENDPROC

	PROCEDURE Destroy
		USE IN SELECT("TEST")
	ENDPROC
ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform