Results 1 to 5 of 5

Thread: font size in listview..

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908

    font size in listview..

    how do i change the font size of the data that is put in the listview?

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    VB Code:
    1. Dim intSize As Integer = 12
    2. ListView.Font = New System.Drawing.Font(ListView.Font, intSize)

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    hmm..funny this code underlines the data i have in the listview...
    or sometimes even cancel the data!

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    listview1.font.size = 26
    I don't live here any more.

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Not surprised about the underlining really, you were using the wrong overload for new Font()

    there are 2 overloads with 2 arguments, one takes the font name and the size and the other takes the font name and font options.

    Since the font options arg is an enumeration...12 is equal to 8+4 which are the values of the "strikeout" and "underline" attributes.

    You must fully qualify your code before letting it run. That's what intellisense is for
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width