Home All Groups Group Topic Archive Search About
Author
17 Oct 2005 7:15 PM
Alastair MacFarlane
Dear All,

Can a treeview (Version 6 - SP4) have more that one font size? I would like
to have child nodes to be a smaller size than the parent node. I know you
can change other properties like background and forecolor but I have not
been able to see a way of changing to various font sizes for the node
object.

Thanks again.

Alastair MacFarlane

Author
17 Oct 2005 8:08 PM
alpine
On Mon, 17 Oct 2005 20:15:40 +0100, "Alastair MacFarlane"
<anonym***@microsoft.com> wrote:

>Dear All,
>
>Can a treeview (Version 6 - SP4) have more that one font size? I would like
>to have child nodes to be a smaller size than the parent node. I know you
>can change other properties like background and forecolor but I have not
>been able to see a way of changing to various font sizes for the node
>object.
>
>Thanks again.
>
>Alastair MacFarlane


You can implement an NM_CUSTOMDRAW handler for the treeview and draw
items any way you like.

HTH,
Bryan
_______________________________
Bryan Stafford
New Vision Software
newvision_don'tspam@mvps.org
Author
17 Oct 2005 8:08 PM
Jeff Johnson [MVP: VB]
Show quote Hide quote
"alpine" <alpine_don'tsendspam@mvps.org> wrote in message
news:a318l1pl0h9s8i2i82uhe1ih8mh634od66@4ax.com...

>>Can a treeview (Version 6 - SP4) have more that one font size? I would
>>like
>>to have child nodes to be a smaller size than the parent node. I know you
>>can change other properties like background and forecolor but I have not
>>been able to see a way of changing to various font sizes for the node
>>object.
>>
>>Thanks again.
>>
>>Alastair MacFarlane
>
>
> You can implement an NM_CUSTOMDRAW handler for the treeview and draw
> items any way you like.

To paraphrase Bryan, yes, but not without subclassing.
Author
17 Oct 2005 9:38 PM
DanS
Show quote Hide quote
"Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in
news:OyEzda10FHA.2540@TK2MSFTNGP09.phx.gbl:

>
> "alpine" <alpine_don'tsendspam@mvps.org> wrote in message
> news:a318l1pl0h9s8i2i82uhe1ih8mh634od66@4ax.com...
>
>>>Can a treeview (Version 6 - SP4) have more that one font size? I
>>>would like
>>>to have child nodes to be a smaller size than the parent node. I know
>>>you can change other properties like background and forecolor but I
>>>have not been able to see a way of changing to various font sizes for
>>>the node object.
>>>
>>>Thanks again.
>>>
>>>Alastair MacFarlane
>>
>>
>> You can implement an NM_CUSTOMDRAW handler for the treeview and draw
>> items any way you like.
>
> To paraphrase Bryan, yes, but not without subclassing.
>
>

Question though.......does the Treeview or Listview need to be created
with the API with the OWNERDATA bits set ?

IIRC, you can't do custom draw using a common controls TV or LV.
Author
17 Oct 2005 8:25 PM
Someone
Link for some samples:

http://groups.google.com/groups?hl=en&num=100&q=NM_CUSTOMDRAW+font+vb

Check web results too.

Show quoteHide quote
"alpine" <alpine_don'tsendspam@mvps.org> wrote in message
news:a318l1pl0h9s8i2i82uhe1ih8mh634od66@4ax.com...
> On Mon, 17 Oct 2005 20:15:40 +0100, "Alastair MacFarlane"
> <anonym***@microsoft.com> wrote:
>
>>Dear All,
>>
>>Can a treeview (Version 6 - SP4) have more that one font size? I would
>>like
>>to have child nodes to be a smaller size than the parent node. I know you
>>can change other properties like background and forecolor but I have not
>>been able to see a way of changing to various font sizes for the node
>>object.
>>
>>Thanks again.
>>
>>Alastair MacFarlane
>
>
> You can implement an NM_CUSTOMDRAW handler for the treeview and draw
> items any way you like.
>
> HTH,
> Bryan
> _______________________________
> Bryan Stafford
> New Vision Software
> newvision_don'tspam@mvps.org
Author
17 Oct 2005 8:59 PM
Alastair MacFarlane
Bryan,

Thanks again for the reply. I will look into it.

Alastair
Show quoteHide quote
"alpine" <alpine_don'tsendspam@mvps.org> wrote in message
news:a318l1pl0h9s8i2i82uhe1ih8mh634od66@4ax.com...
> On Mon, 17 Oct 2005 20:15:40 +0100, "Alastair MacFarlane"
> <anonym***@microsoft.com> wrote:
>
>>Dear All,
>>
>>Can a treeview (Version 6 - SP4) have more that one font size? I would
>>like
>>to have child nodes to be a smaller size than the parent node. I know you
>>can change other properties like background and forecolor but I have not
>>been able to see a way of changing to various font sizes for the node
>>object.
>>
>>Thanks again.
>>
>>Alastair MacFarlane
>
>
> You can implement an NM_CUSTOMDRAW handler for the treeview and draw
> items any way you like.
>
> HTH,
> Bryan
> _______________________________
> Bryan Stafford
> New Vision Software
> newvision_don'tspam@mvps.org