473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SlideBar

hi,
how can i do a SildeBar Control?

Thanks
Nov 19 '05 #1
3 1636
Hi Mike,

You might be able to find one ready-made on the Internet. You could write
your own as well. It would have to be done using JavaScript and HTML. My
guess would be that it would use Divs for the most part. The scroll "groove"
would be an image. The slider would be a div that has event handlers for
onmousedown, onmousemove, and onmouseup. It would use CSS styles and
JasvaScript to move the slider.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Mike" <no@spam.com> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
hi,
how can i do a SildeBar Control?

Thanks

Nov 19 '05 #2
Thanks Kevin.
I already did that, but i don't know how to limit the slider to the table
limits without use absolute-position.
Can u help me?
This's the HTML:

<script language="javascript">

var Dragging = false;
var CurrentControl,CurrentControlY, CurrentControlYTemp;

function OnMove()
{
if (event.button == 1 && Dragging)
{
CurrentControl.style.pixelTop = CurrentControlYTemp + event.clientY -
CurrentControlY;
return false;
}
}

function OnDrag()
{
if (!document.all)
return;
if (event.srcElement.className=="drag")
{
Dragging = true;
CurrentControl = event.srcElement;
var o = document.all.tblLalala;
CurrentControlYTemp = CurrentControl.style.pixelTop;
CurrentControlY = event.clientY;
document.onmousemove = OnMove;
}
}
</script>
.....
<body>
<table height="100%" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<table id="tblLalala" height="100%" width="15" cellpadding="0"
cellspacing="0" style="BORDER-RIGHT: 2px inset; BORDER-TOP: 2px inset;
BORDER-LEFT: 2px inset; MARGIN-RIGHT: 10px; BORDER-BOTTOM: 2px inset">
<tr height="50%">
<td bgcolor="#ffffff" align="right">
<IMG class="drag" src="images/pointer.bmp">
</td>
</tr>
<tr height="50%">
<td bgcolor="#ff0000"></td>
</tr>
</table>
</td>
</tr>
</table>

<script language="javascript">
document.onmousedown = OnDrag;
document.onmouseup = new Function("Dragging = false");
</script>

</body>
.....
Nov 19 '05 #3
Hi Mike,

Unfortunately, my HTML/JavaScript skills are somewhat rusty, as we have a
Graphics designer who handles that UI sort of thing. However, there might be
someone here who can, and there's always Google:

http://www.google.com/search?hl=en&q...Slider+Control

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Mike" <no@spam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Thanks Kevin.
I already did that, but i don't know how to limit the slider to the table
limits without use absolute-position.
Can u help me?
This's the HTML:

<script language="javascript">

var Dragging = false;
var CurrentControl,CurrentControlY, CurrentControlYTemp;

function OnMove()
{
if (event.button == 1 && Dragging)
{
CurrentControl.style.pixelTop = CurrentControlYTemp + event.clientY -
CurrentControlY;
return false;
}
}

function OnDrag()
{
if (!document.all)
return;
if (event.srcElement.className=="drag")
{
Dragging = true;
CurrentControl = event.srcElement;
var o = document.all.tblLalala;
CurrentControlYTemp = CurrentControl.style.pixelTop;
CurrentControlY = event.clientY;
document.onmousemove = OnMove;
}
}
</script>
....
<body>
<table height="100%" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<table id="tblLalala" height="100%" width="15" cellpadding="0"
cellspacing="0" style="BORDER-RIGHT: 2px inset; BORDER-TOP: 2px inset;
BORDER-LEFT: 2px inset; MARGIN-RIGHT: 10px; BORDER-BOTTOM: 2px inset">
<tr height="50%">
<td bgcolor="#ffffff" align="right">
<IMG class="drag" src="images/pointer.bmp">
</td>
</tr>
<tr height="50%">
<td bgcolor="#ff0000"></td>
</tr>
</table>
</td>
</tr>
</table>

<script language="javascript">
document.onmousedown = OnDrag;
document.onmouseup = new Function("Dragging = false");
</script>

</body>
....

Nov 19 '05 #4

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

Similar topics

3
1457
by: Ernst | last post by:
I have a script for a menu. However, this menu uses absolute coordinates. This menu had to be placed on a website. This website is position (centered) using a table. How can I determine/calculate...
1
3626
by: midiweb01 | last post by:
Sorry for my bad english here! I try my best. I would like to make a slideshow for my site about paintings. I have four menus: Portraits-landscapes-Still Life-Animals Each Menu has his own...
7
1414
by: Steven | last post by:
Hi, Thanks all for you help with my "socket and buffer size" question. I have decided to use async ones, and my code is working pretty well. But i still have a non-answered question: Is it...
1
2783
by: Viktor | last post by:
Hello, I started to rewrite the lightbox code for a different layout. The main advantage would be to have a sliding image bar, but I can not get the sliding motion. The html code: <div...
0
1007
by: UJ | last post by:
Does anybody know of any slide bar (sometimes called range bars) that you can use in ASP.Net ? I'd like to have the user enter a percentage between 0 and 100 and it would be cool if there was a...
2
8864
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
3
5585
by: Pikachu | last post by:
The stupid thing is saying there is no border. My page is written as such: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <head> <META...
8
2518
by: MKayHavoc | last post by:
I have the following onload function: function slidebarPrep(){ if(!document.getElementById) return false; var slidebar = document.getElementsByTagName("div"); for(var i = 0; i <...
1
2303
by: somnamblst | last post by:
This function swaps images between a close & replay GIF. Line 12 has a speed of 1 second specified for the slideDown, but no speed specified for the slideUp so it is defaulting to normal. I tried...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7273
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
7322
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...
1
6982
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...
0
7451
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
5572
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,...
1
5000
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...
0
1501
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 ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.