Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ScrollBars property on the form...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00461860
Message ID:
00462956
Views:
11
>Yes you could.
>in my case I have to resize the window in the init anyway.
>

>
>>>The scroll bar must appear at design time otherwise it will not be show at run time.
>>
>>That appears to be the case. I guess you could add a dummy object in the designer to make the scrollbars appear, and remove that object in the Init. That way you'll at least get your scroll bars.

Even though the Scrollbars work (at least for me), there are some issues to be aware of. Check out MS KB article Q193078 for one issue.

There also appears to be a bug. I didn't find it in any KB article. If you dynamically move an object after the form has been shown, the scrollbars will appear as needed. However, the scrollable area has not been calculated correctly. The form will scroll to a postion just above the new Top of the control that caused the Scrollbars to appear.

The following will demonstrate the problem:
oform = createobject('scrollform')
oform.Show(1)
return

DEFINE CLASS scrollform AS form
Top = 0
Left = 0
Height = 177
Width = 274
ScrollBars = 2
DoCreate = .T.
Caption = "Scoll Form"
Name = "Scrollform"

ADD OBJECT CmdMovee AS commandbutton WITH ;
	Top = 144, ;
	Left = 12, ;
	Height = 27, ;
	Width = 84, ;
	Caption = "Movee", ;
	Name = "CmdMovee"

ADD OBJECT CmdMover AS commandbutton WITH ;
	Top = 24, ;
	Left = 204, ;
	Height = 40, ;
	Width = 40, ;
	Caption = "Mover", ;
	Name = "CmdMover"

PROCEDURE CmdMover.Click
	With THISFORM
		With .CmdMovee
			.Top = .Top + 100
			.Parent.Draw
			.Top = .Top - .Height
		Endwith
		.Draw
	Endwith
ENDPROC
ENDDEFINE
If you comment out the .Parent.Draw code, the bug will manifest.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform