Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / December 2003

Tip: Looking for answers? Try searching our database.

setting a CListBox to multiple selection dynamically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brent Baker - 31 Dec 2003 04:42 GMT
Is there a way to change a CListBox from single selection
to multiple selection, or back again, from inside the
program after the CListBox has been created?

Our application has several ListBoxes. I know its easy
to use the properties dialog control it set the control
to be single, or multiple, selection up front. But I'd
like a way to set this property from inside the program,
dynamically.

Thanks for any help.

Brent
David Lowndes - 31 Dec 2003 09:28 GMT
>Is there a way to change a CListBox from single selection
>to multiple selection, or back again, from inside the
>program after the CListBox has been created?

Brent,

You can change the style, but I think you'll find it doesn't take
effect. Many windows only set their behaviour when they're created,
and I think this is one of them.

The usual work-around is to have 2 controls and switch between them,
or to destroy and create a new control.

Dave
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.