but resizing is not th solution I want.
Cause like I said, the user can resize the column, even the maxsize is 0
Main Topics
Browse All TopicsHi everyone,
Could someone tell me how to hide a column in a TListview please?
without destroying it and resizing it, cause the user can resize it with the mouse;
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
sorry about that my submit was to quick
2. if you just need numbers in the field you can use the .tag properties
ListView1.Column[0].Tag := 1;
ListView1.Column[1].Tag := 2;
ShowMessage(IntToStr(ListV
ShowMessage(IntToStr(ListV
3. Create a class which tracks your stuff and pastes it in the listview
Here's the only thing i came up with, if you want to hide column 2 for example then set it's width to 0 and the MaxWidth and MinWidth both to 1 this will stop the user from being able to resize the column.. The only drawback is that you see a 1px break between column 1 and three but i didn't find it particular disturbing.. Oh yeah, showing the column can afcourse be done by resetting the size and making MinWidth and MaxWidth their original values :-)
Regards,
Dj
here is the code:
listview1.Column[1].MinWid
listview1.Column[1].MaxWid
listview1.Column[1].Width := 0;
the columns can't be resized, but if the user keep the left mouse button, he can see the column.
when the button is up, the column return to 0.
I didn't want the column resized even when mouse button is pressed, but the column have to exists
DelphiCool:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
Business Accounts
Answer for Membership
by: geobulPosted on 2003-05-08 at 09:22:34ID: 8489889
The only way I know is resizing it to zero. So, listening...