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

movable label

hi,

i dragged dynamic labels from 1panel to other then once that label is placed on other panel i want that label 2 b movable on run time.
my form is in C#

can u help me with this

bye
Mar 12 '07 #1
3 2145
kenobewan
4,871 Expert 4TB
What progress have you made and do you receive any errors?
Mar 12 '07 #2
Frinavale
9,735 Expert Mod 8TB
hi,

i dragged dynamic labels from 1panel to other then once that label is placed on other panel i want that label 2 b movable on run time.
my form is in C#

can u help me with this

bye
I'm not exactly sure what you're trying to do but I think you're going to need to use the DragPanelExtender that is supplied in the ASP.NET Ajax package. You'd have to put the label into a panel and attach this extender to it in order to make it "Draggable" in the browser.

-Frinny
Mar 12 '07 #3
SammyB
807 Expert 512MB
I created generic event handlers, so all that you need to do is set the Panel (or any other container) AllowDrop property to true and set the DragDrop and DragEnter events. HTH --Sam
Expand|Select|Wrap|Line Numbers
  1. private void label1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
  2. {
  3. DoDragDrop(label1,DragDropEffects.Move);
  4. }
  5. private void AnyContainer_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
  6. {
  7. e.Effect = DragDropEffects.Move;
  8. }
  9. private void AnyContainer_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
  10. {
  11. // Remove label1 from current container
  12. foreach (Control c in this.Controls)
  13. if (c.Contains(label1)) c.Controls.Remove(label1);
  14. // Add label1 to new container and set its location
  15. Control NewParent = (Control)sender;
  16. NewParent.Controls.Add(label1);
  17. Point pt = NewParent.PointToClient(new Point(e.X, e.Y));
  18. label1.Location = pt;
  19. }
Mar 12 '07 #4

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

Similar topics

0
by: sean | last post by:
I'm having problems trying to sort a series of authors who post online using Movable Type. I've tried posting my problem to the Movable Type support group, but no one has even answered my question....
0
by: Fuzzyman | last post by:
Movable Python has just been released on sourceforge. Movable Python is a frozen distribution of Python. It will run python scripts without needing to be installed. ...
1
by: Mircea | last post by:
How I can create a movable component, for example a button, in run-time? Thanks
2
by: Ryan Ternier | last post by:
Hello, I'm looking at creating an application that allows users to create their own templates, and thought of using the same idea's MS used when creating http://sympatico.my.msn.com/. I looked...
10
by: Hello | last post by:
Hello, How to prevent user from moving the form at run time. At the same time, I want to keep my control box and form border. Thanks, Douglas ^^
0
by: Fuzzyman | last post by:
It's finally happened, `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop...
1
by: loga123 | last post by:
Hi All, I am using ASP .NET 2.0. I have gridview displaying data and when a row is selected on gridview "detailsview" pops up based on the row selected from gridview. I want to make this...
3
gauravgmbhr
by: gauravgmbhr | last post by:
hello friends can some one tell me plz can I create a movable as well as resizable html component using javascript plz help me or email me some link that can be helpfull for me
1
by: trint | last post by:
How can I add movable windows to my c# dotNet web app? Do I have to convert the whole thing to AJAX or is it even known how Google does this? Thanks, Trint
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
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,...
0
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...
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.