Print Page | Close Window

Caption of control is not shown

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=19329
Printed Date: 14 September 2025 at 6:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Caption of control is not shown
Posted By: Stefan Überbacher
Subject: Caption of control is not shown
Date Posted: 20 December 2011 at 2:51am
Hi,

I've added a custom control to the commandbar, but the caption of the control is not shown. Why is that?

Stefan




Replies:
Posted By: SuperMario
Date Posted: 03 January 2012 at 2:43pm
You can just add a command and set the style to xtpControlLabel before this custom control.


Posted By: Stefan Überbacher
Date Posted: 04 January 2012 at 1:25am
Ok, but the label is not on the same level as the customcontrol. It should look like this (the customcontrol is a datetimepicker-control):

Date: 04.01.2012

How do you do that in a ribbonbar?


Posted By: SuperMario
Date Posted: 11 January 2012 at 11:20am
I modified the ribbon sample, note the control flags for the progress control:

    Dim TabAdvanced As RibbonTab
    Set TabAdvanced = RibbonBar.InsertTab(7, "&Advanced")
    TabAdvanced.Id = ID_TAB_ADVANCED
    
    Set ViewGroup = TabAdvanced.Groups.AddGroup("&Advanced Controls", ID_GROUP_ADVANCED)
    ViewGroup.ControlsCentering = True
    
    Set Control = ViewGroup.Add(xtpControlLabel, 0, "Indent")
    Control.Style = xtpButtonCaption
    Control.BeginGroup = True
    
    Set Control = CommandBars.CreateCommandBarControl("CXTPControlProgress")
    ViewGroup.AddControl Control
    Control.Width = 100
    Control.Pos = 30
    Control.Flags = xtpFlagWrapRow
  
    Set Control = CommandBars.CreateCommandBarControl("CXTPControlScrollBar")
    ViewGroup.AddControl Control
    Control.Width = 100
    Control.BeginGroup = True
 
    Set Control = CommandBars.CreateCommandBarControl("CXTPControlScrollBar")
    Control.ScrollBarStyle = xtpScrollStyleSlider
    ViewGroup.AddControl Control
    Control.Width = 100
    Control.BeginGroup = True







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