Print Page | Close Window

Changing Font properties for Label

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12125
Printed Date: 17 June 2025 at 4:54pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Changing Font properties for Label
Posted By: LeeHayton
Subject: Changing Font properties for Label
Date Posted: 10 September 2008 at 7:17am
Can I change font properties for a label on a commandbar? 

e.g. Dim cbl as CommandBarLabel
 
    Set cbl = .ActiveMenuBar.Controls.Add(xtpControlLabel, 1, "Label Caption Goes Here")
cbl.fontbold = true
 
I basically want to reproduce the kind of control used in Sharepoint (shown below) which displays a popup menu when the drop down is clicked. Is there another control I should be using?
 
 
 
Thanks
Lee



Replies:
Posted By: victor
Date Posted: 24 June 2009 at 12:58pm
Hi,
Was there an answer to this ?
Thanks
Vic


Posted By: jpbro
Date Posted: 24 June 2009 at 2:07pm
It doesn't look the same as the Sharepoint example, but you could use the xtpControlSplitButtonPopup control to get a clickable arrow button beside your caption. 

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: LeeHayton
Date Posted: 25 June 2009 at 5:23am
Yes you can....but then the caption itself acts like a button and not just a label, and I don't think you can change the font, align the text to the left (it centres) or put a line underneath.
 
I ended up just creating a user control built of a label, a line and a commandbarpopup which snaps to the right hand side of the control when resized.
 
Thanks
Lee



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net