Solved

ListBox tab settings - mine don't work

Posted on 2006-11-11
2
722 Views
Last Modified: 2013-11-20
I'm trying to set tabs in a list box. The box works - my fields are being displayed in the box, but the tab setting apears to have no effect. I have tried settings from 1 to 200 and nothing happens. Ideas? Thanks.

ComplMessage.Format("%d %s %s %.4f %.4f %.4f %d",
Subs[i].ComboLine,
Subs[i].ContractName,
Subs[i].ContractDate,
Subs[i].Last,
Subs[i].Bid,
Subs[i].Offer,
Subs[i].Volume);

int tabber = 10; <----I have varied this from 1 to 200 and nothing happens
int tabs[7];
tabs[0] = tabber;
tabs[1] = tabber;
tabs[2] = tabber;
tabs[3] = tabber;
tabs[4] = tabber;
tabs[5] = tabber;
tabs[6] = tabber;
pListBox->SetTabStops(7, tabs); <---- this doesn't work
pListBox->AddString(ComplMessage); <----this works
0
Comment
Question by:Elliot123
2 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 250 total points
ID: 17924045
Your listbox must have   LBS_USETABSTOPS in order to use CListBox::SetTabStops().. you may mention this style while creating listbox or with ModifyStyle()..

e.g.

pListBox->ModifyStyle(0, LBS_USETABSTOPS, 0);  // Add style LBS_USETABSTOPS

pListBox->SetTabStops(7, tabs);
pListBox->AddString(ComplMessage);

-MAHESH
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 136
conditional code and condition difference 9 83
haveThree challenge 22 118
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 589
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question