PC Review


Reply
Thread Tools Rate Thread

I do not understand how to make my scrollbar on a panel work

 
 
=?Utf-8?B?TGluZGEgTGFsZXdpY3o=?=
Guest
Posts: n/a
 
      28th Dec 2004
I am trying to stretch the dinky screen of the iPaq by adding a panel with a
scrollbar.

I got the panel on and populated with stuff, and the scrollbar set up but I
am not experienced and cannot figure out how to make the scrollbar talk to
the panel position.

I tried to add this following code, which does absolutely nothing and
doesn't even fire when you change the position of the scrollbar. The value
of VscrollBar1 does change but nothing is connecting.

Private Sub VScrollBar1_ValueChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs)
If VScrollBar1.Value <> 0 Then
Panel1.Top = -(VScrollBar1.Value)
Else
Panel1.Top = 0
End If
End Sub


I have looked at some of the other posts, and they assume more knowledge
than I have. Could someone explain this using simple and complete terms? I
would be eternally, (or at least for a real long time) grateful!
 
Reply With Quote
 
 
 
 
Daniel Moth
Guest
Posts: n/a
 
      28th Dec 2004
Without looking at the method body, I'll stay on your comment:
> doesn't even fire when you change the position of the scrollbar. The
> value


Unless you've made a typo in the post, you are missing a Handles
VScrollBar1.ValueChanged i.e.
Private Sub VScrollBar1_ValueChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles VScrollBar1.ValueChanged

After fixing that (or if you are manually hooking to the event with
AddHandler), check out these threads:
http://groups-beta.google.com/group/...rch+this+group

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Linda Lalewicz" <(E-Mail Removed)> wrote in message
news:BB4A9116-A515-401D-8918-(E-Mail Removed)...
>I am trying to stretch the dinky screen of the iPaq by adding a panel with
>a
> scrollbar.
>
> I got the panel on and populated with stuff, and the scrollbar set up but
> I
> am not experienced and cannot figure out how to make the scrollbar talk to
> the panel position.
>
> I tried to add this following code, which does absolutely nothing and
> doesn't even fire when you change the position of the scrollbar. The
> value
> of VscrollBar1 does change but nothing is connecting.
>
> Private Sub VScrollBar1_ValueChanged(ByVal sender As System.Object, ByVal
> e
> As System.EventArgs)
> If VScrollBar1.Value <> 0 Then
> Panel1.Top = -(VScrollBar1.Value)
> Else
> Panel1.Top = 0
> End If
> End Sub
>
>
> I have looked at some of the other posts, and they assume more knowledge
> than I have. Could someone explain this using simple and complete terms?
> I
> would be eternally, (or at least for a real long time) grateful!



 
Reply With Quote
 
=?Utf-8?B?TGluZGEgTGFsZXdpY3o=?=
Guest
Posts: n/a
 
      28th Dec 2004
Thank you that was it.

Somehow all of my handles fell off all of my subroutines. I replaced all
of the button events, but didn't realize this one was off as well. Another
programmer here said that happened to him once too, but he didn't know why
either. Are you familiar with this phenomenon?

L.

"Daniel Moth" wrote:

> Without looking at the method body, I'll stay on your comment:
> > doesn't even fire when you change the position of the scrollbar. The
> > value

>
> Unless you've made a typo in the post, you are missing a Handles
> VScrollBar1.ValueChanged

 
Reply With Quote
 
Daniel Moth
Guest
Posts: n/a
 
      28th Dec 2004
I can't say it has happened to my code/projects... glad it solved it
though...

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Linda Lalewicz" <(E-Mail Removed)> wrote in message
news:C39C27B7-5D9E-4C51-97BF-(E-Mail Removed)...
> Thank you that was it.
>
> Somehow all of my handles fell off all of my subroutines. I replaced all
> of the button events, but didn't realize this one was off as well.
> Another
> programmer here said that happened to him once too, but he didn't know why
> either. Are you familiar with this phenomenon?
>
> L.
>
> "Daniel Moth" wrote:
>
>> Without looking at the method body, I'll stay on your comment:
>> > doesn't even fire when you change the position of the scrollbar. The
>> > value

>>
>> Unless you've made a typo in the post, you are missing a Handles
>> VScrollBar1.ValueChanged




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No scrollbar with UserControl or panel, why ? Scarlatine Microsoft Dot NET Compact Framework 1 2nd Jun 2009 04:29 PM
Scrollbar for a panel Seth Williams Microsoft Dot NET Framework Forms 2 4th Aug 2008 04:26 PM
Panel with picturebox scrollbar Thiru .Net Microsoft VB .NET 4 17th Nov 2005 12:21 PM
Access of Panel scrollbar Marco Microsoft C# .NET 1 16th Sep 2003 08:12 AM
Make scrollbar invisible in panel Martijn Bresser Microsoft Dot NET Framework Forms 1 15th Aug 2003 08:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 PM.