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

rearrage panel in run time

Could anyone tell me how to rearrange panels (panelA, panelB, panelC) in flowLayoutPanel1 (the flow direction is TopDown)?
e.g which in run time, i could drag panelB on top of panelA so the new arrangement will be
(panelB, panelA, panelC)

Thanks.
Jul 31 '09 #1
2 4031
tlhintoq
3,525 Expert 2GB
Panels A, B and C are controls in the flowLayoutPanel1.

flowLayoutPanel1.Controls[0] is panelA
flowLayoutPanel1.Controls[1] is panelB
flowLayoutPanel1.Controls[2] is panelC

So clear the flowLayoutPanel1.Controls then add panels A,B,C in the order you want them.
Jul 31 '09 #2
GaryTexmo
1,501 Expert 1GB
To make it so the mouse can drag controls to reorder them, you'll want to implement drag and drop. I followed this tutorial to do a tab page, it might be similar for a flow layout panel.

http://www.codeproject.com/KB/tabs/d...abcontrol.aspx

You just need to detect what you're hovering over when you click, then as you move the mouse detect if you cross over another control and swap the two. I read this thread earlier and was tossing around the idea of fooling around with this to see if I could make it, but didn't get around to it. I'm also on vacation for the next week so I probably won't.

Good luck though! The codeproject article is very helpful.
Aug 1 '09 #3

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

Similar topics

1
by: Robert Skidmore | last post by:
I am building an application that will fade one panel to another panel. Both panels will have picture boxes in them (thumbnails). This is what I have tried: private void...
0
by: AinO | last post by:
Hi, (VS2003/c# - System.Windows.Forms) I have two panels on a parent panel, where one is docked top and the second docked client area. They both have their Visible property = false at design...
4
by: Alexandre Soares | last post by:
Hi, If I make a control that derives from panel, how can I persist the state of the controls that are inside the panel when it is not rendered (visible = false)? The reason for this is that...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
2
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form....
0
by: Larry Charlton | last post by:
Is there a way to make a Panel (or other control that can contain child controls) so that it will size correctly at design time (based on CSS)? Panel seems to be doing something weird at design...
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
4
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've windows form, in this form i've a panel. I want to draw lines inside the panel using the panel coordinates( meaing that the left upper corner of the panel is 0,0), how can i do it? ...
3
by: zhaodapu | last post by:
I derived a panel class: public class DeskPanel : System.Windows.Forms.Panel Now I want to use the visual designer to add controls in MyPanel class. But I noticed that the visual designer...
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
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...

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.