Thread: ListBox, tabbing

  1. #1
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377

    Angry ListBox, tabbing

    I have a listbox, and a bunch of string in it.
    the strings are in this shape:
    Code:
    sptrinf("%s \t %s", name, lastname);
    '\t' is the tab, my goal is this:
    since all the character widths are not the same:
    mmm
    lll
    i can't align my text:
    mmm slfjsdflkj
    lmm sdlfjsdflk
    lll sdfkljsdflj
    mlm sdlkfjsfj
    and my goal is:
    Code:
    mmm slfjsdflkj
    lmm sdlfjsdflk
    lll sdfkljsdflj
    mlm sdlkfjsfj
    but i don't want to use Courier New. The '\t' isn't working for an unknown reason.
    Someone told me i should set something for tab. I don't know what, help
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    maybe this is what you are looking for
    Kurt

  3. #3
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    i have to write this to a listbox.
    i can't use TabbedTextOut() with a listbox, only somewhere in a window...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  4. #4
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    Hey Salem, this topic is about ListBox Child Window, and that one was about tabs, so don't say i'm crossposting!
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  5. #5
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Ok I looked it up.
    You have to create the listbox with the style LBS_USETABSTOPS and send the message LB_SETTABSTOPS. Hope that helps
    Kurt

  6. #6
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    Quote Originally Posted by ZuK
    Ok I looked it up.
    You have to create the listbox with the style LBS_USETABSTOPS and send the message LB_SETTABSTOPS. Hope that helps
    Kurt
    I am eternaly gratefull
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ListBox Extra Data Storage
    By Welder in forum Windows Programming
    Replies: 1
    Last Post: 11-01-2007, 01:46 PM
  2. Listbox search
    By Elsindes in forum Windows Programming
    Replies: 4
    Last Post: 04-09-2007, 03:47 PM
  3. cant load dialog with listbox, help
    By terracota in forum Windows Programming
    Replies: 2
    Last Post: 11-22-2004, 07:11 PM
  4. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 08:52 PM
  5. Getting FULL filename from listbox
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 01-27-2002, 08:28 AM