ScrollBar on Form
Please support our C++ advertiser: Programming Forums
Thread Solved
![]() |
•
•
Posts: 515
Reputation:
Solved Threads: 1
I have a Form witch scrollbars that is called Form2.
Is there any way to programatically go to the top of the Form without having to scrollup with the mouse ?
So if you have scrolled down to the end of the form. Is it possible to press a button that consist code that will go to the top of the Form2 ?
Is there any way to programatically go to the top of the Form without having to scrollup with the mouse ?
So if you have scrolled down to the end of the form. Is it possible to press a button that consist code that will go to the top of the Form2 ?
•
•
Posts: 515
Reputation:
Solved Threads: 1
I am trying to use this code to programatically scroll the Form2 to the top but this does not work. I think I missing something ?
Form2::VerticalScroll->Maximum;
Last edited by Jennifer84 : May 12th, 2008 at 9:11 am.
•
•
Posts: 515
Reputation:
Solved Threads: 1
I am not sure if I understand.
If I write Form2::VerticalScroll I cant find ClientOrigin or position as members.
I can“t find position or ClientOrigin as member to Form2:: either, so I think I am a bit stuck.
If I write Form2::VerticalScroll I cant find ClientOrigin or position as members.
I can“t find position or ClientOrigin as member to Form2:: either, so I think I am a bit stuck.
> I am not sure if I understand.
Ed was afraid that might happen. Duoas isn't describing Windows Forms, so his suggestions won't work for you. The code you want is
Ed was afraid that might happen. Duoas isn't describing Windows Forms, so his suggestions won't work for you. The code you want is
Form2::VerticalScroll->Value = 0; , but if Ed remembers correctly, that won't work as well as you probably want with the autoscrolling properties of a form. Last edited by Radical Edward : May 12th, 2008 at 3:00 pm.
If at first you don't succeed, keep on sucking until you do succeed.
Ed is close. Jennifer is using C++Builder.
You can set
My apologies on ClientOrigin. I just looked it up and it is a read-only property. Alas.
Keep in mind my capitalization might be a little off.
I admire your tenacity and efforts, but either your documentation really stinks or you still need to work on searching it. (I just got BDS 2006 and it's documentation really stinks.)
Hope this helps.
You can set
Form2::VertScrollBar->Position = 0;My apologies on ClientOrigin. I just looked it up and it is a read-only property. Alas.
Keep in mind my capitalization might be a little off.
I admire your tenacity and efforts, but either your documentation really stinks or you still need to work on searching it. (I just got BDS 2006 and it's documentation really stinks.)
Hope this helps.
Last edited by Duoas : May 12th, 2008 at 6:25 pm.
•
•
Posts: 515
Reputation:
Solved Threads: 1
No problem. I am using this code now and it seems to work fine for this purpose.
Thank you...
Thank you...
Form2::VerticalScroll->Value = 0;
•
•
•
•
Ed is close. Jennifer is using C++Builder.
You can set
Form2::VertScrollBar->Position = 0;
My apologies on ClientOrigin. I just looked it up and it is a read-only property. Alas.
Keep in mind my capitalization might be a little off.
I admire your tenacity and efforts, but either your documentation really stinks or you still need to work on searching it. (I just got BDS 2006 and it's documentation really stinks.)
Hope this helps.
![]() |
Similar Threads
Other Threads in the C++ Forum
- Abnormal Behaviour of Vertical ScrollBar (VB.NET)
- Scrollbar in Form (VB6.0) (Visual Basic 4 / 5 / 6)
- changing the color of a HTML form selection (HTML and CSS)
Other Threads in the C++ Forum
- Previous Thread: Reversing a linked list using Recursion
- Next Thread: this->form2instance.Show();
•
•
•
•
Views: 735 | Replies: 7 | Currently Viewing: 1 (0 members and 1 guests)






Linear Mode