home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4217 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: Re: Tab Stops in combo boxes
  5. Message-ID: <1992Dec15.012019.453@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <1992Dec9.164450.6086@nntp.telxon.com>
  8. Date: Tue, 15 Dec 1992 01:20:19 GMT
  9. Lines: 33
  10.  
  11. In article <1992Dec9.164450.6086@nntp.telxon.com> dgarr@nntp.telxon.com (David Garrison) writes:
  12. >
  13. >
  14. >HELP!!
  15. >
  16. >I'm trying to use the tab stops bit in a drop down combo box
  17. >just like a list box.
  18. >
  19. >What I'm doing is setting the tab stop bit for my combo box on and
  20. >adding strings to the box with '\t' characters.  I'm expecting to see
  21. >the drop down box with aligned column string entries but all I get are 
  22. >funny characters in place of the '\t' characters.
  23. >
  24. >This same procedure works fine with a list box.
  25. >
  26. >Does anyone know how to overcome this problem?  Thanx, in advance.
  27. >
  28.     This problem was just discussed and answered in the past
  29.     week or so.
  30.  
  31.     LBS_USETABSTOPS is for listboxes only - it will not work
  32.     for comboboxes.  You can not use \t tab characters.
  33.     Instead, use sprintf to format your strings with spaces
  34.     between the items and in response to WM_INITDIALOG,
  35.     send a message to the listbox to change the font from
  36.     the default SYSTEM_FONT (proportional pitch) to 
  37.     SYSTEM_FIXED_FONT (fixed pitch):
  38.         SendDlgItemMessage(hdlg,ID_LISTBOX,WM_SETFONT,
  39.         (WPARAM)GetStockObject(SYSTEM_FIXED_FONT),0);
  40. -- 
  41. John A. Grant                        jagrant@emr1.emr.ca
  42. Airborne Geophysics
  43. Geological Survey of Canada, Ottawa
  44.