Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar in Top-Level Form
Message
From
09/09/2008 13:19:52
 
 
To
09/09/2008 11:16:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345973
Message ID:
01346122
Views:
21
>Bingo....I got it. I started over from scratch and did everything everyone said. It was probably the case where I was switching everything around and never got the right combination of properties/code.
>
>One other question. Is it possible to get the toolbar to resize with the form? I have a container inside the toolbar and I'd like it to stretch across the whole bottom of the screen.

That turns out to be pretty tricky. I've done it by putting an ActiveX status bar inside a toolbar with Anchor for the StatusBar set to 15, this code in the BeforeDock method of the toolbar:

This.oStatusBar.Width = This.oForm.Width

a custom lResizingNow property on the toolbar, and a custom ResizeStatus method for the toolbar containing this code:
LOCAL aFired[1]
IF NOT This.lResizingNow
	This.lResizingNow = .T.
	* Need width of calling form to pass in
	AEVENTS(aFired, 0)
	This.oStatusBar.ResizeStatus(aFired[1].Width)
	This.lResizingNow = .F.
ENDIF 
That method is bound via BindEvents to the Resize of the top-level form.

It works well, with the one remaining issue that the user can accidentally resize the status bar.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform