Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ListBox tab settings - mine don't work

Posted on 2006-11-11
2
724 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change owner from userA to server Local Administrators 7 66
noX challenge 17 129
Detect file exist or not 3 179
Change to event 1 119
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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