Click to See Complete Forum and Search --> : Font in a ListView


Sigal Laniado
July 29th, 1999, 03:03 AM
I am tring to update the text's font size in a listview by the Properties (Font) or in the code
(
lvListView.Font.Size = 24
lvListView.Font.Bold = True
)
and both of them are not working!
how can i change the font size of the text within the ListView? any idea?
Thanks
Sigal

Coder79
July 29th, 1999, 03:28 AM
Ok, if you are handling with listboxes the methods are FontSize and FontBold not Font.size and Font.Bold. Try like that. I did it and it worked.

Code:

dim i as integer

list1.fontsize = 24
list1.fontbold = true

for i = 0 to 10
list1.additem "test", i
next i

Hope this helps

Michael

Lothar Haensler
July 29th, 1999, 04:02 AM
funny, I tried that and it worked:


l.Font.Bold = true
l.Font.Size = 20
Dim item as ListItem
set item = l.ListItems.Add
item.Text = "test"



in vb6 sp3

Sigal Laniado
July 29th, 1999, 04:09 AM
Thanks but i am handling with ListView.

Jan Businger
July 29th, 1999, 04:29 AM
Hi,

You can set Listview.font.bold = True (or False)
ListView.font.Size = xyz
ListView.font.Name = "Arial" (or whatever is available)

Coder79
July 30th, 1999, 01:48 AM
Hello, again!

Forgive me my lousy english.
Sorry, I'm just a beginner. I didn't knew the difference. But, hey Thanks now I know. ListView is a view like in Windows NT explorers right side window am I right?

Lothar Haensler
July 30th, 1999, 01:54 AM
Yes, you are right.

Coder79
July 30th, 1999, 02:00 AM
Alright, maybe I someday learn How To Program Visual Basic. =)

Michael