Home All Groups Group Topic Archive Search About

TreeNode with BOLD font get truncated

Author
18 Sep 2006 5:44 PM
pamelafluente
Hi

I noticed that if I use a bold font for 1 TreeNode of a TreeView
several times the string does not fit anymore and gets truncated.

How can I avoid that ?

Any suggestionis appreciated

-P

Author
18 Sep 2006 7:23 PM
Claes Bergefall
> I noticed that if I use a bold font for 1 TreeNode of a TreeView
> several times the string does not fit anymore and gets truncated.

Yepp, even says so in the documentation:
"If the node font is larger than the Font property value set in the TreeView
control, the tree node label text is clipped"
(larger in this case means "takes more physical room to display", it's not
related to the font size)

> How can I avoid that ?

Make the font for the entire TreeView bold and then unbold the items that
you don't want bold.

   /claes
Author
18 Sep 2006 9:49 PM
pamelafluente
Claes Bergefall ha scritto:

> > I noticed that if I use a bold font for 1 TreeNode of a TreeView
> > several times the string does not fit anymore and gets truncated.
>
> Yepp, even says so in the documentation:
> "If the node font is larger than the Font property value set in the TreeView
> control, the tree node label text is clipped"
> (larger in this case means "takes more physical room to display", it's not
> related to the font size)
>
> > How can I avoid that ?
>
> Make the font for the entire TreeView bold and then unbold the items that
> you don't want bold.

Thank you Claes. Very helpful indeed.

(Peccato che there isn't a cleaner solution ! )

-P

Show quoteHide quote
>
>    /claes
Author
18 Sep 2006 11:02 PM
gene kelley
On 18 Sep 2006 14:49:49 -0700, pamelaflue***@libero.it wrote:

Show quoteHide quote
>Claes Bergefall ha scritto:
>
>> > I noticed that if I use a bold font for 1 TreeNode of a TreeView
>> > several times the string does not fit anymore and gets truncated.
>>
>> Yepp, even says so in the documentation:
>> "If the node font is larger than the Font property value set in the TreeView
>> control, the tree node label text is clipped"
>> (larger in this case means "takes more physical room to display", it's not
>> related to the font size)
>>
>> > How can I avoid that ?
>>
>> Make the font for the entire TreeView bold and then unbold the items that
>> you don't want bold.
>
>Thank you Claes. Very helpful indeed.
>
>(Peccato che there isn't a cleaner solution ! )
>
>-P
>
>>
>>    /claes

After setting a given node text to bold, simply setting the node text again displays
the bold text unclipped.

Gene
Author
19 Sep 2006 8:48 AM
pamelafluente
gene kelley ha scritto:

Show quoteHide quote
> On 18 Sep 2006 14:49:49 -0700, pamelaflue***@libero.it wrote:
>
> >> > How can I avoid that ?
> >>
> >> Make the font for the entire TreeView bold and then unbold the items that
> >> you don't want bold.
> >
> >Thank you Claes. Very helpful indeed.
> >
> >(Peccato che there isn't a cleaner solution ! )
> >
> >-P
> >
> >>
> >>    /claes
>
> After setting a given node text to bold, simply setting the node text again displays
> the bold text unclipped.
>

Beautiful!

Thanks

Show quoteHide quote
> Gene