Hi there,
In my application I have a panel that contains a matrix of user controls.
The user control is fairly simple. It merely draws a circle that represents
an object in my code. The object has certain properties that can be
configured, so each control has a context menu that allows such operations.
However, my application requires setting properties for multiple objects at
once. That would require being able to select multiple controls, and having a
context menu for the selection of controls. You could compare it to selecting
icons of the Windows desktop and right-clicking to do something or configure
something, like deleting or setting properties.
My question is how I would go about doing that?
With kind regards,
Tom Tempelaere. 3 3612
Hi Tom,
I think you need to create an container control by your own, capable of
enumerate the contents, this will allow you to call the "general" context
menu and then execute the order per object.
The listview is an example, but of course it implents this tecnique with its
own custom code.
It seems complex but if you think about a little while you can figure the
solution in 1 day,
Some tips:
1) Trap the event when you drag the mouse, from x,y to your final x,y, so
you get a rectangle
2) Your container should store a matrix with the objects positions.
3) Then you can intersect those points with the rectangle and check which
ones are inside
4) Store those objects references in an array
5) Apply the context menu function to those objects on the array.
I don't know if there is a custom control (or even commercial) around to buy
this feature, but I usually go for the custom ones.
Hope this helps
Salva
"TT (Tom Tempelaere)" wrote: Hi there,
In my application I have a panel that contains a matrix of user controls. The user control is fairly simple. It merely draws a circle that represents an object in my code. The object has certain properties that can be configured, so each control has a context menu that allows such operations.
However, my application requires setting properties for multiple objects at once. That would require being able to select multiple controls, and having a context menu for the selection of controls. You could compare it to selecting icons of the Windows desktop and right-clicking to do something or configure something, like deleting or setting properties.
My question is how I would go about doing that?
With kind regards, Tom Tempelaere.
Hi Tom,
I think you need to create an container control by your own, capable of
enumerate the contents, this will allow you to call the "general" context
menu and then execute the order per object.
The listview is an example, but of course it implents this tecnique with its
own custom code.
It seems complex but if you think about a little while you can figure the
solution in 1 day,
Some tips:
1) Trap the event when you drag the mouse, from x,y to your final x,y, so
you get a rectangle
2) Your container should store a matrix with the objects positions.
3) Then you can intersect those points with the rectangle and check which
ones are inside
4) Store those objects references in an array
5) Apply the context menu function to those objects on the array.
I don't know if there is a custom control (or even commercial) around to buy
this feature, but I usually go for the custom ones.
Hope this helps
Salva
"TT (Tom Tempelaere)" wrote: Hi there,
In my application I have a panel that contains a matrix of user controls. The user control is fairly simple. It merely draws a circle that represents an object in my code. The object has certain properties that can be configured, so each control has a context menu that allows such operations.
However, my application requires setting properties for multiple objects at once. That would require being able to select multiple controls, and having a context menu for the selection of controls. You could compare it to selecting icons of the Windows desktop and right-clicking to do something or configure something, like deleting or setting properties.
My question is how I would go about doing that?
With kind regards, Tom Tempelaere.
Hi Salvador,
I was hoping to find an example or a link that explains how to do this. I
haven't found one yet, hence the question. I'd rather start from an example
but any hint is good.
I will have to think about this a little longer. Problem is that I don't
have a lot of time to code this, and obviously, selecting the controls is not
really the focus of the project.
Thanks for the suggestion, and kind regards,
Tom Tempelaere.
"Salvador" wrote: Hi Tom,
I think you need to create an container control by your own, capable of enumerate the contents, this will allow you to call the "general" context menu and then execute the order per object.
The listview is an example, but of course it implents this tecnique with its own custom code.
It seems complex but if you think about a little while you can figure the solution in 1 day,
Some tips: 1) Trap the event when you drag the mouse, from x,y to your final x,y, so you get a rectangle 2) Your container should store a matrix with the objects positions. 3) Then you can intersect those points with the rectangle and check which ones are inside 4) Store those objects references in an array 5) Apply the context menu function to those objects on the array.
I don't know if there is a custom control (or even commercial) around to buy this feature, but I usually go for the custom ones.
Hope this helps Salva "TT (Tom Tempelaere)" wrote:
Hi there,
In my application I have a panel that contains a matrix of user controls. The user control is fairly simple. It merely draws a circle that represents an object in my code. The object has certain properties that can be configured, so each control has a context menu that allows such operations.
However, my application requires setting properties for multiple objects at once. That would require being able to select multiple controls, and having a context menu for the selection of controls. You could compare it to selecting icons of the Windows desktop and right-clicking to do something or configure something, like deleting or setting properties.
My question is how I would go about doing that?
With kind regards, Tom Tempelaere. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bil Muh |
last post by:
Esteemede Developers,
I would like to Thank All of You in advance for your sincere guidances.
I am developing a software using Visual C++ .NET Standard Edition with
Windows Form (.NET)...
|
by: David |
last post by:
Hi,
I have a page that will need to dynamically use 4 different user controls
based on a Query String passed to it.
Currently I have the @Register for each control and the <tagprefix: tagname>
in...
|
by: Matt Sawyer |
last post by:
Hi,
I'm attempting to do a drag and drop operation from one listbox to another.
I have my listboxes setup with SelectionMode = MultiExtended so that I can
use the shift key, cntrl key, etc. to...
|
by: Jeff Tolman |
last post by:
Hi!
I keep getting this error, but I'm not sure why. When I turn off the trace
flag, I only get it at certain times. Even with the trace flag set to true,
I don't understand the output...
|
by: Michał Januszczyk |
last post by:
I have the following code on my aspx page
<%if(user_status==1){%><ctl:state1 runat="server" id="aaa"></ctl:state1><%}else if(user_status==2){%><ctl:state2 runat="server"...
|
by: Novice |
last post by:
Hey all, I have finally managed to create a Custom WebControl and am using a
technique from another programmer to maintain state between pages - I would
just like to validate this idea.
...
|
by: Quina |
last post by:
Hi. Is there someone that can tell me how can I have multiple screens
on the the same form, displaying only on at the time?
Thank you all for any replys.
João Carias
|
by: Darren Carter |
last post by:
Hi,
I have mutliple asp:Panel controls on a single page, each with a default
button defined (each default button resides within its respective asp:Panel).
All validation controls and buttons...
|
by: =?Utf-8?B?UHVjY2E=?= |
last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3
forms. I want allow users to move forward and backward with the forms and
retain the data users have entered. I thought...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |