CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jul 2005
    Posts
    43

    Listbox won't display anything in owner draw mode

    I have a listbox which works perfectly fine in regular mode. I'm experimenting with the other modes which allow you to switch font.

    As soon as I go to ownerdraw mode, either variable or fixed, it is blank when I try to add items to to it. It throws no error but just doesn't do anything. There has to be something else I have to do, to tell it how I want to display it. But I don't know what. I'm using version 2003 of .NET

    I'm using "Items.add" to add items.

    I'm using this line to set font :
    lbox.Font = New Font("Arial", 8.25, FontStyle.Bold, GraphicsUnit.Point, Nothing)
    Then I'm setting it unbold later.

    Why is it working perfectly fine without owner draw? Granted it isn't changing the font but it's working fine. What do I have to do to make it work otherwise, so that I can change the font?

    It's pretty much a standard listbox, without many changes made to the properties.
    Last edited by Josef_Stalin; March 8th, 2010 at 04:45 PM.

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

Featured