Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 9th, 2003, 04:13 AM
a_munro a_munro is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 a_munro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
List Box Columns headings

Can anyone tell me how to set the column headings in VB. I cant find any help on this.

Thanks
Andy

Reply With Quote
  #2  
Old July 9th, 2003, 03:20 PM
NicMic's Avatar
NicMic NicMic is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Cheltenham, England.
Posts: 94 NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 21 m 45 sec
Reputation Power: 9
AFAIK, you can't have column headers as part of a ListBox - you need to put separate Text boxes above the control. Also, don't be fooled by the "Column" property - it simply puts the next item in the list at the top of the next column, when the bottom of the list box is reached - effectively, the listed items are scrolled horizontally.

Don't take the above as gospel - I may be wrong, in which case someone will hopefully correct me.

You may want to look at the ListView control instead (in MSCommCtlLib) - it's much more functional, although a bit of a pig to get to grips with - well worth the effort, though.

Reply With Quote
  #3  
Old July 9th, 2003, 04:11 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
AFAIK you are correct NicMic.
I would also agree that the ListView is a better choice, especially if you want column headers in the code. Although I didn't really find it that hard to work with.

Reply With Quote
  #4  
Old July 9th, 2003, 04:37 PM
NicMic's Avatar
NicMic NicMic is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Cheltenham, England.
Posts: 94 NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 21 m 45 sec
Reputation Power: 9
I think the example I was learning from ("VB & VBA" O'Reilly?) used all the bells and whistles!

Reply With Quote
  #5  
Old July 9th, 2003, 07:28 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Well, I had a couple of classes in College for it, but most of it I have learned on my own.

Reply With Quote
  #6  
Old July 10th, 2003, 03:02 AM
a_munro a_munro is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 a_munro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your help.

However, could you tell me why the listbox object has a columnheads property and what this is for?

Andy

Reply With Quote
  #7  
Old July 10th, 2003, 03:53 AM
NicMic's Avatar
NicMic NicMic is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Cheltenham, England.
Posts: 94 NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 21 m 45 sec
Reputation Power: 9
I think you'll find that's an MS Access (VBA?) control - enticing, I know, but (I suspect) not usable within VB6.

Reply With Quote
  #8  
Old July 10th, 2003, 04:22 AM
a_munro a_munro is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 a_munro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yea it is for VBA, im using it in excel.
Do you know if and how you can set these headings?

Thanks
Andy

Reply With Quote
  #9  
Old July 10th, 2003, 07:14 AM
NicMic's Avatar
NicMic NicMic is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Cheltenham, England.
Posts: 94 NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level)NicMic User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 21 m 45 sec
Reputation Power: 9
Sorry - unknown territory for me. I found the reference to it in MS Access Help (not Excel).

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > List Box Columns headings


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway