473,836 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1819
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********@gma il.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********@gma il.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
3753
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 Form or the Subforms (except for on the opening form, but it doesn't scroll past the top viewable items). If I look at any of the forms separately, the scrollbars do show up and function just fine. The longest subform is 15", and so I have set...
0
1614
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 than the Panel, so ScrollBars appear so all of the viewing area can be seen. However, if I bring up some Windows Form for user input (or whatever), as soon as I close the Form the ScrollBars reset to their minimum location.
1
3679
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 database records and the second with some controls (TextBoxes, OptionButtons...) to edit these records. When the second tab is shown and I use the DataGrid's SetDataBind method, the grid scrollbars are disabled.
17
2094
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 appreciated -- Dino Buljubasic Software Developer http://rivusglobal.com
4
1744
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 user resizes the form, the scrollbars that should be visible on the datagrid are not. Occasionally the scrollbars disappear when the form is maximized when
5
11121
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 set? Thank you very much for your time and consideration in this matter! Christopher Koeber
5
3483
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 to scroll. However the default behavior has the control scroll with the rest of the page. Even a toolstrip demonstrates this same behavior. Any ideas.
2
2226
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 scrollbars for the MDI (main Access "container" window), there are also no scrollbars for the forms I've created - even though I've set scrollbars to "Both" in each form's property window. When opening the MDB, regardless of screen resolution,...
1
21003
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 reference only, no question being asked. This works for forms, as well as "panels". Below example is for forms, but will also work in a panel.
0
9818
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10546
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10590
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7791
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6979
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5649
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4449
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.