[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

ListView Report Column Adjust

BillyJ

6/15/2016 9:00:00 PM

Need to use the listview without column headers so set it to hide.
I have only two columns but need to be able to adjust the column widths.

How to do that?

Thought about showing the headers without text but they are too tall.
Cannot find any way to set the header height to make usable.

Is there a way to do this?

Grid will not work in this application.
4 Answers

mm

6/16/2016 7:13:00 PM

0


"BillyJ" <BJ@nospamnow.com> escribió en el mensaje
news:njsfkm$2mf$1@gioia.aioe.org...
> Need to use the listview without column headers so set it to hide.
> I have only two columns but need to be able to adjust the column widths.
>
> How to do that?
>
> Thought about showing the headers without text but they are too tall.
> Cannot find any way to set the header height to make usable.
>
> Is there a way to do this?
>
> Grid will not work in this application.

Why don't you set by code the columns widths to their proper values based on
the lengths of the text that are displayed?


RonW

6/16/2016 7:44:00 PM

0

On Wed, 15 Jun 2016 14:00:07 -0700, BillyJ <BJ@nospamnow.com> wrote:

>Thought about showing the headers without text but they are too tall.

Don't know what you mean by "too tall." I just threw together a quick
test with a Listview (Common controls 5) in report mode with blank
headers and they were the same height as if there were text in them.

How about a one-character blank string (a single space) as the header
text?

Wildman

6/16/2016 9:56:00 PM

0

On Wed, 15 Jun 2016 14:00:07 -0700, BillyJ wrote:

> Need to use the listview without column headers so set it to hide.
> I have only two columns but need to be able to adjust the column widths.
>
> How to do that?
>
> Thought about showing the headers without text but they are too tall.
> Cannot find any way to set the header height to make usable.
>
> Is there a way to do this?
>
> Grid will not work in this application.

In the listview properties window, set HideColumnHeaders to True.

Or in code: ListView1.HideColumnHeaders = True

--
<Wildman> GNU/Linux user #557453
The cow died so I don't need your bull!

BillyJ

6/17/2016 4:20:00 PM

0

I will try again.

I want to be able to adjust the column width with the mouse BUT I do not
what to have headers. That does not seem to be allowed.

So if I must have headers then I want very short blank headers (i.e.
minimal height) so I can grab with the mouse and adjust the column
width. So how do I adjust the header height without affecting the data
rows height?

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---