I'm trying to create a custom control that has 2 listviews, in view
smallicon. I'm using these with code that makes them drag/drop controls, so
what I am after is a control that does drag/drop automatically between these
2 listviews. However, I'm running into difficulty - when I add the control
to a form, I have no way of adding items to listview1, since the custom
control is not one listview, but rather two. I've used inherits
windows.system. form.usercontro l, standard with the creation of a windows
control library.
Any ideas how I can have a custom control with 2 listviews but still be able
to access all of the methods, properties, events of either or both of the
listviews in the control?
Thanks for any help.
Bernie Yaeger 3 1198
Hi Bernie, this isn't my forte, but I managed to get something working that
may be of help.
I created a class that Inherits System.Windows. Forms.Container Control and
then added
Protected Overrides Sub OnLayout(ByVal levent As
System.Windows. Forms.LayoutEve ntArgs)
Me.Controls.Add (New Windows.Forms.L istView)
Me.Controls.Add (New Windows.Forms.L istView)
End Sub
When I add the compiled dll to another project I can do the following
Dim lb1 As ListView
lb1 = Me.DualListView 1.Controls(0)
lb1.Items.Add(N ew ListViewItem("L ist box 1"))
Dim lb2 As ListView
lb2 = Me.DualListView 1.Controls(1)
lb2.Items.Add(N ew ListViewItem("L ist box 2"))
It's not exactly elegent, and there may be better ways of doing it but it
might help
To all, please feel free to add to this, or answer Bernie's question another
way. I'd be interested in a much better thought out answer.
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:Oe******** ******@TK2MSFTN GP10.phx.gbl... I'm trying to create a custom control that has 2 listviews, in view smallicon. I'm using these with code that makes them drag/drop controls, so what I am after is a control that does drag/drop automatically between these 2 listviews. However, I'm running into difficulty - when I add the control to a form, I have no way of adding items to listview1, since the custom control is not one listview, but rather two. I've used inherits windows.system. form.usercontro l, standard with the creation of a windows control library.
Any ideas how I can have a custom control with 2 listviews but still be able to access all of the methods, properties, events of either or both of the listviews in the control?
Thanks for any help.
Bernie Yaeger
Hi John,
I've since found a different way of going about it, but your idea seems
really useful. Tx for the help!
Bernie
"JohnFol" <Ou************ @WibbleObbble.C om> wrote in message
news:0L******** ********@newsfe 3-gui.ntli.net... Hi Bernie, this isn't my forte, but I managed to get something working that may be of help.
I created a class that Inherits System.Windows. Forms.Container Control and then added Protected Overrides Sub OnLayout(ByVal levent As System.Windows. Forms.LayoutEve ntArgs)
Me.Controls.Add (New Windows.Forms.L istView)
Me.Controls.Add (New Windows.Forms.L istView)
End Sub
When I add the compiled dll to another project I can do the following
Dim lb1 As ListView
lb1 = Me.DualListView 1.Controls(0)
lb1.Items.Add(N ew ListViewItem("L ist box 1"))
Dim lb2 As ListView
lb2 = Me.DualListView 1.Controls(1)
lb2.Items.Add(N ew ListViewItem("L ist box 2")) It's not exactly elegent, and there may be better ways of doing it but it might help
To all, please feel free to add to this, or answer Bernie's question another way. I'd be interested in a much better thought out answer.
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message news:Oe******** ******@TK2MSFTN GP10.phx.gbl... I'm trying to create a custom control that has 2 listviews, in view smallicon. I'm using these with code that makes them drag/drop controls, so what I am after is a control that does drag/drop automatically between these 2 listviews. However, I'm running into difficulty - when I add the control to a form, I have no way of adding items to listview1, since the custom control is not one listview, but rather two. I've used inherits windows.system. form.usercontro l, standard with the creation of a windows control library.
Any ideas how I can have a custom control with 2 listviews but still be able to access all of the methods, properties, events of either or both of the listviews in the control?
Thanks for any help.
Bernie Yaeger
Hi John,
I exactly duplicated your code but it's not working as you describe. Is
there something else that you're doing?
Bernie
"JohnFol" <Ou************ @WibbleObbble.C om> wrote in message
news:0L******** ********@newsfe 3-gui.ntli.net... Hi Bernie, this isn't my forte, but I managed to get something working that may be of help.
I created a class that Inherits System.Windows. Forms.Container Control and then added Protected Overrides Sub OnLayout(ByVal levent As System.Windows. Forms.LayoutEve ntArgs)
Me.Controls.Add (New Windows.Forms.L istView)
Me.Controls.Add (New Windows.Forms.L istView)
End Sub
When I add the compiled dll to another project I can do the following
Dim lb1 As ListView
lb1 = Me.DualListView 1.Controls(0)
lb1.Items.Add(N ew ListViewItem("L ist box 1"))
Dim lb2 As ListView
lb2 = Me.DualListView 1.Controls(1)
lb2.Items.Add(N ew ListViewItem("L ist box 2")) It's not exactly elegent, and there may be better ways of doing it but it might help
To all, please feel free to add to this, or answer Bernie's question another way. I'd be interested in a much better thought out answer.
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message news:Oe******** ******@TK2MSFTN GP10.phx.gbl... I'm trying to create a custom control that has 2 listviews, in view smallicon. I'm using these with code that makes them drag/drop controls, so what I am after is a control that does drag/drop automatically between these 2 listviews. However, I'm running into difficulty - when I add the control to a form, I have no way of adding items to listview1, since the custom control is not one listview, but rather two. I've used inherits windows.system. form.usercontro l, standard with the creation of a windows control library.
Any ideas how I can have a custom control with 2 listviews but still be able to access all of the methods, properties, events of either or both of the listviews in the control?
Thanks for any help.
Bernie Yaeger
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin Maat [EBL] |
last post by:
Hi,
I have a GUI application that responds to events coming from an externaql
application. In the implementing code for the event I need to create a GUI
control and "parent" the control into the GUI. Doing this directly fails, it
is not allowed to parent a control that was not created on the main GUI
thread into the main GUI through another thread (an exception is thrown on
"control.Parent = container;").
So I have to create the...
|
by: charliewest |
last post by:
I need to create textboxes in real-time, the actual number of which is
determine by a result from a database query. I have been able to create the
controls, and then add them to the ASPX page. However, when i submit the
page, i am unable to read the values entered in these new textboxes.
I have first tried to use System.Web.UI.WebControls.TextBox namespace,
however, i was unable to read any value from my textboxes using the following...
|
by: Calvin Lai |
last post by:
Hi all,
I have a problem in creating web user control *programatically*. Problem as
follows:
1. WebUserControl1 contains a server side table named Table1
2. WebForm1 contain a server panel and server form.
3. In WebForm1.aspx.cs, I created a WebUserControl1 and attached it to panel
by:
WebUserControl1 oCtl = new WebUserControl1();
|
by: Iain |
last post by:
Can I apologise for the lengthy nature of this post. The scenario is
complicated (though I hope the solution is not!)
basically, I've got a custom template control which binds itself to a tree
structure. The template items describe how each particular note type of
the tree should be rendered (the nodes are data capture elements - bool
string and more complicated things).
I don't want to use ViewState because of size (there are...
|
by: Paul |
last post by:
Hi!
I have been wondering about a design issue for some time now and hope
someone can help sort this one out for me.
Say you have to create some webcontrols dynamically. Each controls creation
is dependent on another’s selected value. That is, you can’t create control B
if you don’t know the value of control A. There is no problem this far. I’ve
done some testing and if I always create the control in Page_Init, ASP.NET
has...
| |
by: Schüle Daniel |
last post by:
Hello
I am trying to customize the handling of complex numbers
what I am missing is a builtin possibility to create
complex numbers in polar coordinates
so first I wrote a standalone function
>>> def polar(r,arg):
.... re, im = r*cos(arg), r*sin(arg)
|
by: Russ |
last post by:
I'd like to get output formatting for my own classes that mimics the
built-in output formatting. For example,
>>> x = 4.54
>>> print "%4.2f" % x
4.54
In other words, if I substitute a class instance for "x" above, I'd
like to make the format string apply to an element or elements of the
instance. Can I somehow overload the "%" operator for that? Thanks.
|
by: Ravi Shekhar |
last post by:
Hello,
So I'm doing some mathematical modeling and it turns out I need
distinct imaginary and complex types to carry out complex contour
integration.
I want to have it in all three precisions (float, double, and decimal),
and the code is highly redundant, but I can't seem to come up with a
clean way to use Generics in the code. For example, the following
doesn't work
|
by: brixdotnet |
last post by:
Hi there!
I made own user control for displaying and editing content. In
Page_Load of this control is checked if user is authorized for editing
if so, button for editing is shown, otherwise controll works in
display only mode. I want now use this control to add new content. The
idea is that in another web form, let's call AddNewContent.aspx there
is placed MyContentControl and I want to run in Editing mode with all
fields reset to...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |