Discussion:
CListCtrl InsertColumn(0, "L", LVCFMT_RIGHT)?
(too old to reply)
Olaf van der Spek
2005-03-19 20:08:01 UTC
Permalink
Hi,

The CListCtrl doesn't appear to like the first column to be aligned
non-left. Why?
By inserting the first column with InsertColumn(1, "L", LVCFMT_RIGHT),
it does show it right aligned. But what if there are columns already?
Should I delete and reinsert them all?
Frank Hickman [MVP]
2005-03-19 22:18:36 UTC
Permalink
Post by Olaf van der Spek
Hi,
The CListCtrl doesn't appear to like the first column to be aligned
non-left. Why?
By inserting the first column with InsertColumn(1, "L", LVCFMT_RIGHT), it
does show it right aligned. But what if there are columns already? Should
I delete and reinsert them all?
The help for InsertColumn says that the left most column must be left
aligned. The method you describe may work however it will probably cause
you heartache in the future.
--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the ***@m_ with @ to reply.
Doug Harrison [MVP]
2005-03-19 23:12:25 UTC
Permalink
Post by Frank Hickman [MVP]
The help for InsertColumn says that the left most column must be left
aligned. The method you describe may work however it will probably cause
you heartache in the future.
What they really mean is the "primary column". You can change the order
from the user's perspective with SetColumnOrderArray.
--
Doug Harrison
Microsoft MVP - Visual C++
Olaf van der Spek
2005-03-19 23:48:46 UTC
Permalink
Post by Doug Harrison [MVP]
Post by Frank Hickman [MVP]
The help for InsertColumn says that the left most column must be left
aligned. The method you describe may work however it will probably cause
you heartache in the future.
What they really mean is the "primary column". You can change the order
from the user's perspective with SetColumnOrderArray.
Yes, I experimented with that. But there appears to be a bug with the
last logical column and autosize_useheader, where the last logical
column is sometimes expanded as if it was the last physical column.
Doug Harrison [MVP]
2005-03-20 00:48:51 UTC
Permalink
Post by Olaf van der Spek
Yes, I experimented with that. But there appears to be a bug with the
last logical column and autosize_useheader, where the last logical
column is sometimes expanded as if it was the last physical column.
I expect you could emulate that option fairly easily. More difficult to
overcome are the drawing bugs that affect full-row selections when icons
are used.
--
Doug Harrison
Microsoft MVP - Visual C++
Olaf van der Spek
2005-03-20 11:34:18 UTC
Permalink
Post by Doug Harrison [MVP]
Post by Olaf van der Spek
Yes, I experimented with that. But there appears to be a bug with the
last logical column and autosize_useheader, where the last logical
column is sometimes expanded as if it was the last physical column.
I expect you could emulate that option fairly easily. More difficult to
overcome are the drawing bugs that affect full-row selections when icons
are used.
Just wondering, if those bugs are known, why are they not fixed (by MS)?
Olaf van der Spek
2005-03-19 23:47:22 UTC
Permalink
Post by Frank Hickman [MVP]
Post by Olaf van der Spek
Hi,
The CListCtrl doesn't appear to like the first column to be aligned
non-left. Why?
By inserting the first column with InsertColumn(1, "L", LVCFMT_RIGHT), it
does show it right aligned. But what if there are columns already? Should
I delete and reinsert them all?
The help for InsertColumn says that the left most column must be left
aligned. The method you describe may work however it will probably cause
Is there any good reason why it must be left aligned?
Post by Frank Hickman [MVP]
you heartache in the future.
Frank Hickman [MVP]
2005-03-20 02:26:33 UTC
Permalink
Post by Olaf van der Spek
Post by Frank Hickman [MVP]
Post by Olaf van der Spek
Hi,
The CListCtrl doesn't appear to like the first column to be aligned
non-left. Why?
By inserting the first column with InsertColumn(1, "L", LVCFMT_RIGHT), it
does show it right aligned. But what if there are columns already? Should
I delete and reinsert them all?
The help for InsertColumn says that the left most column must be left
aligned. The method you describe may work however it will probably cause
Is there any good reason why it must be left aligned?
I really do not know, I have asked myself that same question many times.
--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the ***@m_ with @ to reply.
Loading...