473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Scrollbars in form

Hi,

Can i cause scrollbars to be activate only on part of the form?
Meaning"

I have buttons in top of form which i don't want scrollbars to scroll
this button. I want this button to be available even if acroll bars are
activated.
TIA.

Jan 6 '07 #1
2 1799
Hi,
if the button is a descendant control of the control which is scrolling
then it will be scrolled along with the control it is part of. To stop your
button scrolling you could either change it's location as the control is
scrolling so it appears to stay in the same place, but I do not recommend
this as the button will jerk around as it is moved, or another alternative is
to move the button outside of the control's child control collection that is
being scrolled, but place it ontop of the control location wise so that it
appears to be in the scrollable area.

For example you can add a button and a panel to the forms Controls
collection, make the panel scrollable and have it contain all of the content,
not the form directly, then move your button ontop of the panel (make sure
it's z-order is greater than that of the panel i.e call BringToFront()) and
now you can scroll the panel but the button will remain stationary.

Mark.
--
http://www.markdawson.org
"Er********@gmail.com" wrote:
Hi,

Can i cause scrollbars to be activate only on part of the form?
Meaning"

I have buttons in top of form which i don't want scrollbars to scroll
this button. I want this button to be available even if acroll bars are
activated.
TIA.

Jan 6 '07 #2

Mark R. Dawson wrote:
Hi,
if the button is a descendant control of the control which is scrolling
then it will be scrolled along with the control it is part of. To stop your
button scrolling you could either change it's location as the control is
scrolling so it appears to stay in the same place, but I do not recommend
this as the button will jerk around as it is moved, or another alternative is
to move the button outside of the control's child control collection that is
being scrolled, but place it ontop of the control location wise so that it
appears to be in the scrollable area.

For example you can add a button and a panel to the forms Controls
collection, make the panel scrollable and have it contain all of the content,
not the form directly, then move your button ontop of the panel (make sure
it's z-order is greater than that of the panel i.e call BringToFront()) and
now you can scroll the panel but the button will remain stationary.

Mark.
--
http://www.markdawson.org
"Er********@gmail.com" wrote:
Hi,

Can i cause scrollbars to be activate only on part of the form?
Meaning"

I have buttons in top of form which i don't want scrollbars to scroll
this button. I want this button to be available even if acroll bars are
activated.
TIA.
Hi Mark,

I used Panel as you suggested. I set the panel to autoscroll true and
the button is outside of the panel and it is not scrolled. thanks for
your suggestion.

Jan 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andi Plotsky | last post by:
I have a subform where I dynamically change the SourceObject dependent upon the User's response to questions on the Main form. My problem is that the scrollbars do not show up on either the Main...
0
by: Jack Smash | last post by:
I'm having this seemingly simple problem with my ScrollBars resetting, but I can not figure out why. I have a panel which has a UserControl for my drawing area. The UserControl is much bigger...
1
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have to problems concerning datagrids, tabcontrols and scrollbars: 1) I created a form with a TabControl. This TabControl has two TabPages: the first with a datagrid to browse...
17
by: Dino M. Buljubasic | last post by:
I have a treeview and a checked list view controls one beside another. I want to make them work so that when I scroll down or up one of them the other does the same. Any help will be...
4
by: scorpion53061 | last post by:
I have a datagrid that is switches between 2 different datasources. I set the anchor properties of my datagrid to for bottom, top, left , right. My form is set ot maximize on open. If the...
5
by: Christopher Kurtis Koeber | last post by:
Dear All, This may sound like an elementary question but how do you implement scrollbars for the Picturebox control. Do I have to create my own code to do this or is there some property that I can...
5
by: james | last post by:
How can I control the placement of scrollbars in mdi child windows? I need to place a control at the top of my child form and this control needs to always be visible. The rest of the page needs...
2
by: RMCEU1 | last post by:
I can't imagine I'm the first to experience this, but Google searches in all access newsgroups have produced nothing. Access 2003/WinXP After creating an MDE for my app, not only are there no...
1
by: raylopez99 | last post by:
Scrollbars scroll bars adding scrollbars in C# Forms 2.0 scrollbars don't work won't work how to add scrollbar in C# Here is how to add a scrollbar to a form. It's not in any book. For future...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.