473,397 Members | 2,068 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,397 software developers and data experts.

Scrolling with Scrollbar hidden?

5
Hello,

Is there a way to scroll inside a Panel but with the scroll bar hidden? hmm.. let me explain.

I have a Panel that contains buttons. These buttons are created programatically depending on the information gathered from a Database. Some buttons may be outside the range of view if there are a lot of records.

I want the user to be able to scroll down when he clicks a Button which is created outside the Panel and has nothing to do with the buttons created with the information from the Database. The only relation is the fact that it only appears when there are buttons created outside the range of view... anyway, the buttons are created fine.

However I am not able to scroll down unless I put panel1.AutoScroll = true; ... even if I put panel1.VerticalScroll.Visible = false; the scrollbar can be seen.

I already tried putting a Parent Panel with AutoScroll and the Child Panel without it and move the AutoScrollPosition of the Parent but it doesn't work.

Maybe there's another way to simulate this?? I tried using an array of Panels but I couldn't figure out at the momento of clicking the Button how to know which of the Panels was the active (seen by the user) one.

Thanks in advance!!
Jun 25 '09 #1
4 18626
I think that "panel1.VerticalScroll.Value" can help you.

Good luck.
Jun 25 '09 #2
vann
5
Thank you very much!!! It works
Jun 25 '09 #3
vann
5
UPDATE:

I was able to scroll down but I was having problems scrolling back up. For some weird reason the IF statement I had wasn't working.. I tried with several expressions like:

if(panel.VerticalScroll.Value != 0)
if(panel.VerticalScroll.Value == panel.VerticalScroll.Maximum)

and some others... but it would always go to the ELSE clause which is the one that scrolls down. The only way the IF would work is if I put panel.AutoScroll = true.

So here's what I did... I put panel.AutoScroll = true which we know, makes the Scrollbar visible (which I don't want) but then I made another panel (thin and the same height as the main one) that would hide the scrollbar... and there I have it, it works as I want.

I hope this helps anyone else and doesn't spend as much time with this as I did =)
Jun 25 '09 #4
I had a simular problem.
Maybe the Scollbar have a bug.
It don't work if you put
panel1.AutoScroll=false
and for example
panel1.HorizontalScroll.Value = 0.
In that case the problem is 0. Sometimes it don't work.
Try this too ...
panel1.AutoScroll=true;
panel1.HorizontalScroll.Value = newValue; // Or VerticalScroll
panel1.Update();
panel1.AutoScroll=false;

I hope this help anyone else too.
Jul 20 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Kai Grossjohann | last post by:
I'm trying to synchronize the scrolling of two <div> elements. The top element is for showing column headers, the bottom div shows the table rows. I consed up the following HTML/JavaScript...
4
by: Cat Laugel | last post by:
Hello, I am redesigning my website and would like to have the text scroll within the webpage without the page itself scrolling.... if you understand what I mean... ;-) I want a very sleek look...
3
by: Scott M | last post by:
Hi, I am currently trying to write a simple game using vb.net the form I am working on is 800*600 (this is set as the maximum size) and autoscroll is set to true. The user moves around the...
9
by: Mark Horrell | last post by:
I'm having problems getting scrollbars to appear using the 'scrolling' attribute of the 'iframe' tag, and I'm wondering if anyone can help me. I would expect the following code to produce a...
1
by: mike | last post by:
I have this table that I think should be scrolling but it does not. No scroll bar is shown, all the content is shown <table align="center" border="0" cellspacing="0" cellpadding="0"...
2
by: Eduard | last post by:
I have a ASP.Net datagrid wrap in the following div: <DIV id="divPart2" style="OVERFLOW: hidden">. Another div controls the horizontal scrolling: <DIV id="scroll1" style="OVERFLOW: scroll;...
3
by: j0rd4n | last post by:
I have a user control that needs to allow vertical scrolling but not horizontal scrolling. In the user control's resize event, I need to adjust the size of all the children controls. For this to...
0
by: LostInMd | last post by:
Hi All, I've got an owner drawn listBox where I draw and measure the items that I add to the listBox. For example, I have a listBox that can only display 10 characters on each horizontal line. ...
3
by: dunerunner | last post by:
We have a table within a div whose overflow-x is scroll. It is a long table, so the width of the div is 800px, giving us a scrollbar at the bottom. When users tab from cell to cell, the cells...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.