From: BeeJ on

Is there something that needs to be set/reset to allow the following
ForeColor and Bold to work.
Error handler is in place. On Error GoTo ErrHandler
I step through in the IDE with no errors but the ListView just ignores the
code.
Other ListSubItems methods such as work as expected: e.g. data read and
write ListSubItems(2).Text

Code extract.

Dim itmX As ListItem

Set itmX = lvwControl(1).selectedItem ' row

itmX.ListSubItems(2).ForeColor = vbRed
itmX.ListSubItems(2).Bold = True

lvwControl(1).FullRowSelect = True


From: Dee Earley on
On 23/06/2010 03:05, BeeJ wrote:
>
> Is there something that needs to be set/reset to allow the following
> ForeColor and Bold to work.
> Error handler is in place. On Error GoTo ErrHandler
> I step through in the IDE with no errors but the ListView just ignores
> the code.
> Other ListSubItems methods such as work as expected: e.g. data read and
> write ListSubItems(2).Text
>
> Code extract.
>
> Dim itmX As ListItem
>
> Set itmX = lvwControl(1).selectedItem ' row
>
> itmX.ListSubItems(2).ForeColor = vbRed
> itmX.ListSubItems(2).Bold = True
>
> lvwControl(1).FullRowSelect = True

Works fine here with no code changes (apart from adding two items) and
the default control dropped on the form, changed to Report style and 3
columns added.

(VB6 SP6 on Windows 6.1 :)

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
From: BeeJ on
BeeJ explained on 6/22/2010 :
> Is there something that needs to be set/reset to allow the following
> ForeColor and Bold to work.
> Error handler is in place. On Error GoTo ErrHandler
> I step through in the IDE with no errors but the ListView just ignores the
> code.
> Other ListSubItems methods such as work as expected: e.g. data read and write
> ListSubItems(2).Text
>
> Code extract.
>
> Dim itmX As ListItem
>
> Set itmX = lvwControl(1).selectedItem ' row
>
> itmX.ListSubItems(2).ForeColor = vbRed
> itmX.ListSubItems(2).Bold = True
>
> lvwControl(1).FullRowSelect = True

So this is part of why I could not get this to work, beside not being
able to find good documentation about the Listiew control.
Yes, using Report mode.

(1) if FullRowSelect is used, as I did, the selection highligh changes
all forecolors to black/gray so it looked like no color.
FullRowSelect=True means, to highlight the full row (I understood this)
but it also means that you can click anywhere on the row to select the
row. Where FullRowSelect=False means you can only click on the .Text
cell to select the row. This seems to be the only way for me to see
the colors.
(2) ListSubItems(n) is not valid when a row is added until .SubItems(n)
= something is executed. i.e. ListView has a ragged right until
SubItems are "let". Never knew that. So my routine, with error
handler, was missing that the ListSubItems was not "working" as
expected.

Where can I find detailed help for ListView?


From: Kevin Provance on
Jesus.

Google the following, ya lazy lubbocks: detailed help listview vb -.net

--
Customer Hatred Knows No Bounds at MSFT
Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Bawwk! Paulie want a dingleball, bawwk!
"BeeJ" <beejuice(a)live.com> wrote in message
news:hvt9k2$t39$1(a)news.eternal-september.org...
: BeeJ explained on 6/22/2010 :
: > Is there something that needs to be set/reset to allow the following
: > ForeColor and Bold to work.
: > Error handler is in place. On Error GoTo ErrHandler
: > I step through in the IDE with no errors but the ListView just ignores
the
: > code.
: > Other ListSubItems methods such as work as expected: e.g. data read and
write
: > ListSubItems(2).Text
: >
: > Code extract.
: >
: > Dim itmX As ListItem
: >
: > Set itmX = lvwControl(1).selectedItem ' row
: >
: > itmX.ListSubItems(2).ForeColor = vbRed
: > itmX.ListSubItems(2).Bold = True
: >
: > lvwControl(1).FullRowSelect = True
:
: So this is part of why I could not get this to work, beside not being
: able to find good documentation about the Listiew control.
: Yes, using Report mode.
:
: (1) if FullRowSelect is used, as I did, the selection highligh changes
: all forecolors to black/gray so it looked like no color.
: FullRowSelect=True means, to highlight the full row (I understood this)
: but it also means that you can click anywhere on the row to select the
: row. Where FullRowSelect=False means you can only click on the .Text
: cell to select the row. This seems to be the only way for me to see
: the colors.
: (2) ListSubItems(n) is not valid when a row is added until .SubItems(n)
: = something is executed. i.e. ListView has a ragged right until
: SubItems are "let". Never knew that. So my routine, with error
: handler, was missing that the ListSubItems was not "working" as
: expected.
:
: Where can I find detailed help for ListView?
:
:

From: Dee Earley on
On 23/06/2010 16:34, BeeJ wrote:
> Where can I find detailed help for ListView?

MSDN.
Helpfully, the online version for VB6 doesn't to mention any of the V6
properties though

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)