Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dockable form and browse
Message
From
21/06/2005 17:28:16
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01025212
Message ID:
01025283
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform