|
-
March 9th, 1999, 11:09 PM
#1
FileListBox-I want to set the multiselect property but..
Hello,
I want to set the file multiselect flag on my filelistbox or listbox at runtime - VB5.0 tells me this is a readonly property and that I can only change this property at design time. What is the work around to this? I really need the ability to set this property to 1 2 or 3 at runtime.
Thanks, Terry
-
March 10th, 1999, 05:46 AM
#2
Re: FileListBox-I want to set the multiselect property but..
This is a read only property at run time, because when your VB application starts, the API calls that create the listbox control have to specify the Multi-Select flag as part of the call. This style cannot be changed at run time.
There are a few work arounds that spring to mind :
1. Have 3 listboxes on the screen, all containing the same information. Each on will have a different 'select' property. When the user specifies 'multi' or 'single' select, display the relevant listbox over the existing one.
2. Code some horrible workaround to make a 'multi-select' listbox act like a single select listbox (capturing mouse-up/click events) - a bit messy!
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|