PC Review


Reply
Thread Tools Rate Thread

ColumnHeaderCollection

 
 
AnonMan
Guest
Posts: n/a
 
      15th Dec 2003
I have a function Called HeaderCol() that builds up and
returns a Column Header Collection.

How do I assign this to my listview in my calling
function ?

Thanks


 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      15th Dec 2003
"AnonMan" <(E-Mail Removed)> schrieb
> I have a function Called HeaderCol() that builds up and
> returns a Column Header Collection.
>
> How do I assign this to my listview in my calling
> function ?


You don't have to assign it because you have to pass the Listview to the
constructor of the ColumnHeaderCollection.


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      15th Dec 2003
"Armin Zingler" <(E-Mail Removed)> schrieb
> "AnonMan" <(E-Mail Removed)> schrieb
> > I have a function Called HeaderCol() that builds up and
> > returns a Column Header Collection.
> >
> > How do I assign this to my listview in my calling
> > function ?

>
> You don't have to assign it because you have to pass the Listview to
> the constructor of the ColumnHeaderCollection.


....which means that the ColumnHeaderCollection is automatically assigned to
the Listview.


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
AnonMan
Guest
Posts: n/a
 
      15th Dec 2003
Thanks,

Supposing I have an array of column headers I want to
assign to the listview:

I currently use

for icount = 0 to ubound(myarray)
ListView1.Columns.Add(myarray
(iCount).ToString, 100, HorizontalAlignment.Left)
next icount

I was curious if I could have a function that builds up
any set of columns and return/assign them to any
new listview I create in the form of a column collection.


>-----Original Message-----
>"Armin Zingler" <(E-Mail Removed)> schrieb
>> "AnonMan" <(E-Mail Removed)> schrieb
>> > I have a function Called HeaderCol() that builds up

and
>> > returns a Column Header Collection.
>> >
>> > How do I assign this to my listview in my calling
>> > function ?

>>
>> You don't have to assign it because you have to pass

the Listview to
>> the constructor of the ColumnHeaderCollection.

>
>....which means that the ColumnHeaderCollection is

automatically assigned to
>the Listview.
>
>
>--
>Armin
>
>http://www.plig.net/nnq/nquote.html
>http://www.netmeister.org/news/learn2quote.html
>
>.
>

 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      15th Dec 2003
"AnonMan" <(E-Mail Removed)> schrieb
> Thanks,
>
> Supposing I have an array of column headers I want to
> assign to the listview:
>
> I currently use
>
> for icount = 0 to ubound(myarray)
> ListView1.Columns.Add(myarray
> (iCount).ToString, 100, HorizontalAlignment.Left)
> next icount
>
> I was curious if I could have a function that builds up
> any set of columns and return/assign them to any
> new listview I create in the form of a column collection.



Pass the listview to the function as an argument. In the function, pass the
listview to the constructor of the ColumnHeaderCollection.


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ColumnHeaderCollection - Listview with CF ? HomeAutomation Freak Microsoft Dot NET Compact Framework 3 27th Apr 2004 08:05 PM
ColumnHeaderCollection: Add Items at DesignTime Stefan Urech Microsoft C# .NET 1 17th Nov 2003 12:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 AM.