473,388 Members | 1,382 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,388 software developers and data experts.

drag within scrollable div

How do I make an object that's within a DIV, whose overflow style is set
to "auto", draggable? I've had a number of goes but the ways I've tried
depend on absolutely positioning the object which means it gets dragged
"out" of the DIV.

It doesn't matter how far a user drags the object.

Andrew Poulos
Aug 25 '08 #1
3 1105
Andrew Poulos meinte:
How do I make an object that's within a DIV, whose overflow style is set
to "auto", draggable? I've had a number of goes but the ways I've tried
depend on absolutely positioning
Why? Position it relatively.
Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Aug 25 '08 #2
Gregor Kofler wrote:
Andrew Poulos meinte:
>How do I make an object that's within a DIV, whose overflow style is
set to "auto", draggable? I've had a number of goes but the ways I've
tried depend on absolutely positioning

Why? Position it relatively.
Yep, you're right. It needed to be positioned but not necessarily
absolutely.

Andrew Poulos
Aug 25 '08 #3
Andrew Poulos wrote:
How do I make an object that's within a DIV, whose overflow style is set
to "auto", draggable? I've had a number of goes but the ways I've tried
depend on absolutely positioning the object which means it gets dragged
"out" of the DIV.

It doesn't matter how far a user drags the object.
The positioning scheme of a dragable object does not really matter as long
as you calculate its new position as its old position plus the difference
between the new and old cursor coordinates, while keeping the positioning
scheme (except setting "static" to "relative"). It appears that this is
also the most efficient and most compatible approach.
HTH

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Aug 25 '08 #4

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

Similar topics

1
by: Targa | last post by:
I have an ASP scheduling application in which there are blocks of time, represented with a table, within another table which is the timeline. In other words, I have a table with a vertical...
7
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header |...
1
by: Ryan Stewart | last post by:
If you don't want to read this post because of its length, I understand. I've spent two and a half days on this problem and have a good deal of information to relate. And this is kind of a long...
5
by: Brian Henry | last post by:
Hello, I want to make a control that has a scrollable Gantt type display (not really one but will look similar to one) this is going to be custom drawn (i already have the drawing procedure...
2
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
6
by: Alfonso2968 | last post by:
Hello, If someone can help plz. I have searched everything and all I can find is how to drag and drop within a form from panel to panel. What I need to do is Drag an image from the desktop...
1
by: Red Head | last post by:
Hello :) I would like to have an horizontal image list where you can drag and drop the images to reorder them (like slide reorder in powerpoint, but then in an horizontal way) so i had a look...
5
by: phub11 | last post by:
Hi all, This is a pretty simple question, but after some hunting on the web I can't find the answer: I have a table embedded in a scrollable div, and have each cell anchored so that when a...
2
by: bob | last post by:
Hi all, I have a treeview that has drag drop. Works well enough but... If you drag out of bounds of the treeview the nodrop icon comes on. Fair enough. But when I move back inside the treeview...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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,...

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.