473,757 Members | 10,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating a custom listview item

Can anyone point me in the direction of creating a custom listview item? I
guess the other question then - is this possible? I want to create a list of
listview items comprised each comprised of text and a set of textboxes.
May 18 '07 #1
7 5117
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"brainfuelmedia " <br************ @discussions.mi crosoft.comwrot e in message
news:7C******** *************** ***********@mic rosoft.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.

May 18 '07 #2
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om

"brainfuelmedia " <brainfuelme... @discussions.mi crosoft.comwrot e in message

news:7C******** *************** ***********@mic rosoft.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,

Why not using DataGrid?

Moty

May 18 '07 #3
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Moty Michaely" <Mo*****@gmail. comwrote in message
news:11******** *************@l 77g2000hsb.goog legroups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
> This is going to be pretty hard to do. Windows Controls do not
natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation,
as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om

"brainfuelmedi a" <brainfuelme... @discussions.mi crosoft.comwrot e in
message

news:7C******* *************** ************@mi crosoft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.

Hi,

Why not using DataGrid?

Moty

May 18 '07 #4
On May 18, 11:45 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om

"Moty Michaely" <Moty...@gmail. comwrote in message

news:11******** *************@l 77g2000hsb.goog legroups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
This is going to be pretty hard to do. Windows Controls do not
natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.
If you are able to, take a look at Windows Presentation Foundation,
as
it would provide what you need much more easily.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om
"brainfuelmedia " <brainfuelme... @discussions.mi crosoft.comwrot e in
message
>news:7C******* *************** ************@mi crosoft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,
Why not using DataGrid?
Moty
Nich (hope I can call you nich),

you are absolutely right, there are many differences (conceptually and
visually), but if the needs are editable cells and UI Providers, maybe
the OP should reconsider using listview (by it's current
features...).
As in my opinion, the cost of owner drawing the list items climbs the
usefulness.

Moty

May 18 '07 #5
Nicholas Paldino [.NET/C# MVP] wrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.
"brainfuelmedia " <br************ @discussions.mi crosoft.comwrot e in message news:7C******** *************** ***********@mic rosoft.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.
You might check out the following codeproject control:

http://www.codeproject.com/cs/miscctrl/aa_listview.asp

This is a listview-like control (it does NOT inherit from .Net listview) which
has the hooks you need to embed a custom control into the list items of a given
column. I have used it, it works. Comes with source and some examples. It may
be that you can do the same with the 2.0 DataGridView as others have suggested .
.. . not sure about the custom control part, though.
HTH,
-rick-
May 19 '07 #6
Thanks, Rick. I've dowloaded the files and will see if this fits in to what
I'm trying to accomplish.

"Rick Lones" wrote:
Nicholas Paldino [.NET/C# MVP] wrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.
"brainfuelmedia " <br************ @discussions.mi crosoft.comwrot e in message news:7C******** *************** ***********@mic rosoft.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.

You might check out the following codeproject control:

http://www.codeproject.com/cs/miscctrl/aa_listview.asp

This is a listview-like control (it does NOT inherit from .Net listview) which
has the hooks you need to embed a custom control into the list items of a given
column. I have used it, it works. Comes with source and some examples. It may
be that you can do the same with the 2.0 DataGridView as others have suggested .
.. . not sure about the custom control part, though.
HTH,
-rick-
May 22 '07 #7
Thanks for you help. I'll do a little research in to implementing this in to
a datagrid.

"Moty Michaely" wrote:
On May 18, 11:45 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om

"Moty Michaely" <Moty...@gmail. comwrote in message

news:11******** *************@l 77g2000hsb.goog legroups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guar d.caspershouse. comwrote:
> This is going to be pretty hard to do. Windows Controls do not
>natively
>support composition, so you would have to handle all the
>repainting/positioning/etc, etc, yourself.
> If you are able to, take a look at Windows Presentation Foundation,
>as
>it would provide what you need much more easily.
>--
> - Nicholas Paldino [.NET/C# MVP]
> - m...@spam.guard .caspershouse.c om
>"brainfuelmedi a" <brainfuelme... @discussions.mi crosoft.comwrot e in
>message
>>news:7C****** *************** *************@m icrosoft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,
Why not using DataGrid?
Moty

Nich (hope I can call you nich),

you are absolutely right, there are many differences (conceptually and
visually), but if the needs are editable cells and UI Providers, maybe
the OP should reconsider using listview (by it's current
features...).
As in my opinion, the cost of owner drawing the list items climbs the
usefulness.

Moty

May 22 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1254
by: timtos | last post by:
I just started to create my own ListView control and already have big problems... I use the following code at the moment: protected override void OnPaint(PaintEventArgs pe) { this.SuspendLayout(); if (this.View == View.Details) { Graphics g = pe.Graphics;
2
4733
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add images to listview also(This is to list all the items in my inbox, and want to give the user the feel of outlook). Since it hangs for even 1000 items in the inbox, i tried to shift to virtual listview. But virtual listview
2
2112
by: Brian S | last post by:
I have a custom listView that works fine. There are items that are colored red to notify the user that there is a problem. However, if you select one of the red items, then select space below any of the other items, the red item turns back to default black. The only code getting called on this is a listView_Click event. If you select any other item, no matter what color, from the listView, the original one that was selected stays red. ...
8
3193
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn when the control is painted or resized. When the control is drawn it draws also the items found in the collection. So far so good.... I have 3 questions which I'm unable to find a solution
0
1644
by: sorpor | last post by:
I am trying to create a custom listviewsorter by implementing IComparer. My listview has check boxes and the purpose is to move checked item to top of list. They all will be sorted ascendingly. It throws error "-1 is not a valid index" when the sorting is done with listview. I have no problem using the same custom sorter for an arraylist of listviewitems. A bug in listview control? Any suggestion? Thanks, -sorpor
5
5848
by: ToddH | last post by:
I know the following code is C#. I'm a vb programmer trying to learn a new language. I posted this in the c# group but never got a response. You guys seem to know alot about all languages and have all the answers, so here it is.. I'm trying to create a custom listview that uses custom listviewitems. The listviewitems persist just fine in design mode. However, when I build the solution, the listview item doesn't show up. I've run some tests,...
0
1339
by: Piotr Strycharz | last post by:
Hi, I need to develop a custom control. The control is going to be something like Properties window in VS - listview (grid?) with resizable columns and collapsable sections. The control needs to be read-only, so I do not need embeded text/listboxes, but I need pictures and some more features. So I started to extend ListView control. First I tried to do custom item selection (pseudo-code): ListView:
12
3413
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. Very simple. I would like to create listviewitem's for display in a listview control. The listview items need to contain properties from Internet Explorer windows i've managed to collect into an arraylist.
1
1602
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
I'm running VS2008 & attempting to solve a problem I've encountered while developing some software for our business. Here's the basic idea...I've created a class that represents a file (with members such as file name, file location, and a string containing the files data). Each file object also contains an ArrayList of another custom object I've created--a field object (which is basically two fields--field name & field data). These...
0
9489
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, 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...
0
9298
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,...
0
10072
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7286
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 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...
0
6562
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();...
0
5172
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...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.