Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to center label vertically in toolbar
Message
From
14/04/2006 18:54:30
 
 
To
03/04/2006 01:25:24
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01109825
Message ID:
01113814
Views:
21
>>Hi,
>>
>>I want to add a label to a toolbar and center it vertically in the toolbar. Right now, it appears right next to the top with no obvious way to move it down. The top property seems to be readonly. Is there a way to lower it?
>>
>>TIA,
>>
>>Alex
>
>Put it into a container

Add this code to your label class init event:
If Not Pemstatus(_Screen,[lblVertAligned],5) Then
	_Screen.AddObject([lblVertAligned],[Label])
Endif

With _Screen.lblVertAligned
	.Top = -100
	.Visible = .T.
	.AutoSize = .T.
	.FontBold = This.FontBold
	.FontItalic = This.FontItalic
	.FontName = This.FontName
	.FontSize = This.FontSize
	.FontStrikethru = This.FontStrikethru
	.FontUnderline = This.FontUnderline
	.Caption = This.Caption
	.Anchor = This.Anchor

	This.Anchor = 0
	This.Rotation = 360
	This.Width = .Width
	This.Anchor = .Anchor
Endwith
Carlos
Previous
Reply
Map
View

Click here to load this message in the networking platform