Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2004, 04:47 AM
Registered User
 
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Treeview

Is it possible to drag and drop an element of microsoft treeview in a web page ?
If yes, how can i do this ?
Thanks

 
Old May 24th, 2004, 03:15 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

let us know if you got it.

this a sample code to drag inside the same window-->>

----------------------
<html>
<head>
<title>Drag 'n' Drop</title>
<script type="text/javascript">
<!--

drag = 0;
move = 0;

function setDiv(dragger)
{
dragDiv = dragger;
drag = 1;
}

function startdrag()
{
window.document.onmousedown = mouseDown;
window.document.onmouseup = mouseUp;
window.document.onmousemove = mouseMove;
window.document.ondragstart = mouseEnd;
}

function mouseDown()
{
if (drag==1)
{
clickleft = window.event.x - parseInt(dragDiv.style.left);
clicktop = window.event.y - parseInt(dragDiv.style.top);
move = 1;
}
}

function mouseEnd()
{
window.event.returnValue = false;
}

function mouseMove()
{
if (move==1)
{
dragDiv.style.left = window.event.x - clickleft;
dragDiv.style.top = window.event.y - clicktop;
}
}

function mouseUp()
{
move = 0
}

//-->
</script>
</head>
<body onLoad="startdrag()">
<div id="north" onMouseOver="setDiv(north)" style="cursor: move; position: absolute; left: 10; top: 35">
MO
</div>
<div id="south" onMouseOver="setDiv(south)" style="cursor: move; position: absolute; left: 10; top: 5">
W
</div>
<div id="east" onMouseOver="setDiv(east)" style="cursor: move; position: absolute; left: 10; top: 20">
E
</div>
<div id="west" onMouseOver="setDiv(west)" style="cursor: move; position: absolute; left: 10; top: 50">
VE
</div>
</body>
</html>
----------------------

also if you open a child window from certain window
you could use
window.opener.document.all.item('ObjName').value=C ertainValue
to assign values to parent window

Hope That help To Continue...


Ahmed Ali
Software Developer
 
Old May 24th, 2004, 03:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, you can. But you have to download and install it first; it doesn't come with VS.NET

Take a look here for the control: http://www.asp.net/ControlGallery/de...=38&tabindex=2

HtH,

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
[Microsoft][ODBC Microsoft Access Driver] Syntax e chinedu Classic ASP Databases 3 November 18th, 2004 03:48 PM
Microsoft Works to Microsoft Access lryckman Access 4 April 12th, 2004 03:17 PM
TreeView surendran Classic ASP Basics 2 October 30th, 2003 06:48 AM
treeview Beulah ASP.NET 1.0 and 1.1 Basics 0 September 10th, 2003 09:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.