9 Replies - 5853 Views - Last Post: 17 April 2009 - 07:56 PM Rate Topic: -----

#1 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Custom Scrollbar

Posted 12 April 2009 - 05:44 AM

Hi all, I have added VScrollbar to my app to take the place of the skinny one that shows up in my FlowLayoutPanel - touch scren app. Working on setting the properties correctly, I am geting close, but not there yet...

'in my valueChanged event
vsFLP.Maximum = flp1.Controls.Count * 60 ' 60 being the size of each control in the flp
flp1.VerticalScroll.Value = vsFLP.Value



I have been playing with the .LargeChange too, but so far not working. So any help would be appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Custom Scrollbar

#2 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 12 April 2009 - 07:54 PM

Anyone, anyone???
Was This Post Helpful? 0
  • +
  • -

#3 Asscotte  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 35
  • View blog
  • Posts: 610
  • Joined: 08-February 09

Re: Custom Scrollbar

Posted 14 April 2009 - 04:57 AM

I had a look on a search engine called google heres the link for some stuff that found

http://www.google.co...lient=firefox-a

and then I went on to find this tutoiral complete with scource!

http://www.codeproje...escrollbar.aspx

enjoy :D
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 15 April 2009 - 04:22 PM

Thanks for the help, I will have to spend some time playing with it.
Was This Post Helpful? 0
  • +
  • -

#5 Asscotte  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 35
  • View blog
  • Posts: 610
  • Joined: 08-February 09

Re: Custom Scrollbar

Posted 16 April 2009 - 03:01 AM

Thats okay there are a few tutorials on utube i think :)
Was This Post Helpful? 0
  • +
  • -

#6 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 16 April 2009 - 12:38 PM

Thanks Asscotte, the problem I am faced with is understanding the setup, adding controls changes the maximum and I believe the LargeChange number too, or at least I think so. The maximum is the pixels of the container regardless of the visible size - right? So flp.controls.count * the size of the control added. What is the diff b/t the scroll event and the value changed?

This post has been edited by hawkvalley1: 16 April 2009 - 01:03 PM

Was This Post Helpful? 0
  • +
  • -

#7 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 16 April 2009 - 05:33 PM

Well I am not sure, but it seems there might be a bug with FLPs and scrolling. I have my custom scrolling(while dragging) via a timer, the trouble is when I scroll up it will jump down a short ways, either by using the scrollbutton or by using my timers. So how do I keep it at the top?
Was This Post Helpful? 0
  • +
  • -

#8 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 16 April 2009 - 07:13 PM

Ok, flowLayoutPanels have issues when scrolling if the item you are dragging is located in an area that is out of the visible area after you are done with the dragDrop - it wants to go back to where it was located, so in the mouseDown event just change the focus to the panel itself(flowLayoutPanel1.Select) and it will scroll where ever you want! yeah!
Still working on the correct values for the custom vscrollbar(largeChange and maximum when controls are added).
Was This Post Helpful? 0
  • +
  • -

#9 Asscotte  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 35
  • View blog
  • Posts: 610
  • Joined: 08-February 09

Re: Custom Scrollbar

Posted 17 April 2009 - 07:51 AM

View Posthawkvalley1, on 16 Apr, 2009 - 06:13 PM, said:

Ok, flowLayoutPanels have issues when scrolling if the item you are dragging is located in an area that is out of the visible area after you are done with the dragDrop - it wants to go back to where it was located, so in the mouseDown event just change the focus to the panel itself(flowLayoutPanel1.Select) and it will scroll where ever you want! yeah!
Still working on the correct values for the custom vscrollbar(largeChange and maximum when controls are added).

why dont you use trial and error until you get it right then compile it into a compnent that way you wouldnt have to go through that torment every time lol. :P
Was This Post Helpful? 0
  • +
  • -

#10 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,684
  • Joined: 02-July 08

Re: Custom Scrollbar

Posted 17 April 2009 - 07:56 PM

Well I have been doing the trial/read/search and finally got it. This is my first such problem with scrolling while dragging with a flowlayoutpanel. As far as the scrollbar I got it too. Thanks for help, there was useful info in there. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1