Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Simple Slider
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Simple Slider

 Post Reply Post Reply
Author
Message
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post Topic: Simple Slider
    Posted: 08 December 2007 at 7:16am
Is it possible to add a slider to a RibbonTab and if so how ?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2007 at 4:30pm
No joy in VB6...

Any chance of a working example in vb6 ?
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.