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

Problem with Slider

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

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Topic: Problem with Slider
    Posted: 27 April 2009 at 2:30am
I want Set and Get "Value" of Control...

Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 12:31pm
Use CXTPControlSlider (instead of CXTPControlScrollbar), dim your control variable as CommandBarSlider and then set the Control.Pos property to change the position.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 1:58pm
can you show a exemple ?
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:06pm
Try this code on a form with a CommandBar control (CommandBars1) on it:


Option Explicit

Private Const mc_IdSlider As Long = 1000

Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
   Select Case Control.Id
   Case mc_IdSlider
      ' Slider has been clicked or changed
      Debug.Print "Slider Value: " & Control.Pos
   End Select
End Sub

Private Sub Form_Load()
   Dim lo_Slider As CommandBarSlider
  
   With Me.CommandBars1
      Set lo_Slider = .CreateCommandBarControl("CXTPControlSlider")
      With lo_Slider
         .Id = mc_IdSlider ' Give the slider control a unique identifier
        
         ' Set slider range & position
         .Min = 0
         .Max = 100
         .Pos = 25   ' Set initial position/value of slider
      End With
     
      .Item(1).Controls.AddControl lo_Slider
   End With
End Sub

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

Language: Visual Basic 6.0 SP6

Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:08pm
i do´t like of style of "CXTPControlSlider"
think that CXTPControlScrollbar is more beautiful.

can i use CXTPcontrolscrollbar same ???

think that have a solucion to use it in VB.

comeone can help ? thanks
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:13pm
Did you try it? Seems to work for me:


Option Explicit

Private Const mc_IdScroll As Long = 1000

Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
   Select Case Control.Id
   Case mc_IdScroll
      ' Scroll has been clicked or changed
      Debug.Print "Scroll Value: " & Control.Pos
   End Select
End Sub

Private Sub Form_Load()
   Dim lo_Scroll As CommandBarScrollBar
  
   With Me.CommandBars1
      Set lo_Scroll = .CreateCommandBarControl("CXTPControlScrollBar")
      With lo_Scroll
         .Id = mc_IdScroll ' Give the Scroll control a unique identifier
        
         ' Set Scroll range & position
         .Min = 0
         .Max = 100
         .Pos = 25   ' Set initial position/value of Scroll
      End With
     
      .Item(1).Controls.AddControl lo_Scroll
   End With
End Sub

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

Language: Visual Basic 6.0 SP6

Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:18pm
OHHHHHHHHH perfect jbbro

thanks so much :D

very good
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:36pm
is possible change slider to vertical ?
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2009 at 6:38am
Glad to help!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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.219 seconds.