: i have a listbox in which text is to be displayed coloumn wise as shown below: : 1 ABCD 23 21 12: 2 wwww 23 22 22: : Right now i am storing each item of a row in a CString. And for displaying each row i use the following code: : sDisplayStr.Format("%-10s%-10s%-10s%-10s%-10s%", sSlNo, sName, sText1, sText2, sText3);: : where sSlNo = "1", sName = "ABCD", sText1 = "23", sText2 = "21", sText3 = "12": : I am not able to format the text properly. could anybody help me out please?: Also i want to know how do i change the font of the list box contents to courier new?: : tnx: pinkie:

[blue]The 'Courier' will force you to scroll back and forth horizontally to see the whole record. When formatting use ' ' to separate the strings from each other and in the dialog designer make sure the checkbox "Use Tabstops" is ON.[/blue][code]CString strRecord;CString strField1;CString strField2;CString strField3;