🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1772

Re: Tab Stops in combo boxes

#1772
From: John Grant
Date: Tue, 15 Dec 1992 01:20
33 lines
1657 bytes
In article <1992Dec9.164450.6086@nntp.telxon.com> dgarr@nntp.telxon.com (David Garrison) writes:
>
>
>HELP!!
>
>I'm trying to use the tab stops bit in a drop down combo box
>just like a list box.
>
>What I'm doing is setting the tab stop bit for my combo box on and
>adding strings to the box with '\t' characters.  I'm expecting to see
>the drop down box with aligned column string entries but all I get are 
>funny characters in place of the '\t' characters.
>
>This same procedure works fine with a list box.
>
>Does anyone know how to overcome this problem?  Thanx, in advance.
>
	This problem was just discussed and answered in the past
	week or so.

	LBS_USETABSTOPS is for listboxes only - it will not work
	for comboboxes.  You can not use \t tab characters.
	Instead, use sprintf to format your strings with spaces
	between the items and in response to WM_INITDIALOG,
	send a message to the listbox to change the font from
	the default SYSTEM_FONT (proportional pitch) to 
	SYSTEM_FIXED_FONT (fixed pitch):
		SendDlgItemMessage(hdlg,ID_LISTBOX,WM_SETFONT,
		(WPARAM)GetStockObject(SYSTEM_FIXED_FONT),0);
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Technical Details
Message-ID: <1992Dec15.012019.453@emr1.emr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant
References: <1992Dec9.164450.6086@nntp.telxon.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Tab Stops in combo boxes
Message-ID: <1992Dec15.012019.453@emr1.emr.ca>
Organization: Energy, Mines, and Resources, Ottawa
References: <1992Dec9.164450.6086@nntp.telxon.com>
Date: Tue, 15 Dec 1992 01:20:19 GMT
Lines: 33