Print Page | Close Window

Simple Slider

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=9045
Printed Date: 17 June 2025 at 3:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Simple Slider
Posted By: XpatTech
Subject: Simple Slider
Date Posted: 08 December 2007 at 7:16am
Is it possible to add a slider to a RibbonTab and if so how ?



Replies:
Posted By: Oleg
Date Posted: 08 December 2007 at 2:17pm
Hi,
 
Try this code:
 
Dim ControlSlider As XtremeCommandBars.CommandBarSlider
    Set ControlSlider = CommandBars.CreateCommandBarControl("CXTPControlSlider")
    ControlFile.CommandBar.Controls.AddControl ControlSlider


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: XpatTech
Date Posted: 08 December 2007 at 4:30pm
No joy in VB6...

Any chance of a working example in vb6 ?


Posted By: ijwelch
Date Posted: 08 December 2007 at 9:45pm
Here's another example which works in 11.2.1 ('cb' is the CommandBars control):

    Dim oRibbonBar As RibbonBar
    Dim oTab       As RibbonTab
    Dim oGrp       As RibbonGroup
    Dim oSlider    As CommandBarSlider

    Set oRibbonBar = cb.AddRibbonBar("Main")
    Set oTab = oRibbonBar.InsertTab(99, "Test")
   
    Set oGrp = oTab.Groups.AddGroup("Test Group", 999)
    With oGrp
        Set oSlider = cb.CreateCommandBarControl("CXTPControlSlider")
        oSlider.Min = 0
        oSlider.Max = 10
        oSlider.Pos = 5 'this is the current value
        oSlider.Id = 9999 'give it an ID
        .AddControl oSlider
    End With



Oleg, I can't find a way to add tooltip or caption for the slider. In the end I added a Label control, enabled actions and updated caption as necessary.

Can slider have tooltip and caption?




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