Thread: ListView Doubt ?

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    15

    ListView Doubt ?

    How do you CENTER & BOLD the labels of the columns (i.e headings) using ListView. I did not understand the below found in MSDN..

    /*
    If a column is added to a list-view control with index 0 (the leftmost column) and with
    LVCFMT_RIGHT or LVCFMT_CENTER specified, the text is not right-aligned or centered. The text in the index 0 column is left-aligned. Therefore if you keep inserting columns with index 0, the text in all columns are left-aligned. If you want the first column to be
    right-aligned or centered you can make a dummy column, then insert one or more columns with index 1 or higher and specify the alignment you require. Finally delete the dummy column.
    */

    Also I want the last column to occupy the remaining width of the window even if resizing of the Main Window takes place.

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    28
    Well im guessing you know how to make columns? I forget off the top of my head... but basically create one column that is "DUMMY" (whatever) then do the rest (starting with index 1) with your center alignment and bold font, then when you're done, delete the first column.

    What MSDN is saying is that the first column (index 0) can not be right or center justified. To get around this do the above technique.

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    15

    I tried creating a first column but failed doing stuff in the msdn

    I tried dude. But i am freakin out since weeks . I am not able to get over the probelm. Can you help me out. I have uploaded my program..


    http://www.geocities.com/kalamirch/SislProject_tabs.zip

    I also have many resizing probelms in this code when i click on View --> Show/Hide toolbar and Status Bar.

    Please help me out dude.

    Hemanth

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ListView Refresh, Update
    By de4th in forum C++ Programming
    Replies: 1
    Last Post: 12-23-2006, 09:13 AM
  2. Replies: 6
    Last Post: 07-10-2006, 12:05 AM
  3. Troubles with ListView and Toolbar
    By cornholio in forum Windows Programming
    Replies: 8
    Last Post: 11-14-2005, 01:26 AM
  4. Listview with c/c++
    By X PaYnE X in forum Windows Programming
    Replies: 8
    Last Post: 03-20-2005, 11:29 PM
  5. Listview??
    By SuperNewbie in forum C# Programming
    Replies: 4
    Last Post: 02-13-2003, 03:34 AM