?
Solved

Combo Box "List" property

Posted on 2005-03-11
4
Medium Priority
?
186 Views
Last Modified: 2013-12-26
Hello folks. Am working on a Combo Box control that centers on a Combo Box

The standard Combo Box has a List property. Now the VB Wizard created this for me as such:

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cboData,cboData,-1,List
Public Property Get List(ByVal Index As Integer) As String
    List = cboData.List(Index)
End Property

Public Property Let List(ByVal Index As Integer, ByVal New_List As String)
    cboData.List(Index) = New_List
    PropertyChanged "List"
End Property



Lurvely. Except it's no good to me. If I drop my User Control on a form, the "List" property is not visible in the Properties window. I would like to expose a "List" property to a user of the control, i.e. a developer plonking my control on to a form.


Regarding the points: I ALWAYS give "A"s. If your solution is a post to another web page or a convincing "sorry but this can't be done", you will get the original 20 points and an "A". If it takes more effort than that, I *will* increase to 50. If it takes a *lot* of effort ..... I currently have 410 points available.

Many thanks

Pino
0
Comment
Question by:WernerVonBraun
[X]
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
  • 3
4 Comments
 
LVL 4

Author Comment

by:WernerVonBraun
ID: 13516078
PS - I do not need to know how to persist the List property in the property bag; I can work *that* bit out myself. What I can't figure out is how to expose it ..... but I've already said that.
0
 
LVL 10

Accepted Solution

by:
fds_fatboy earned 80 total points
ID: 13517783
>> Lurvely. Except it's no good to me. If I drop my User Control on a form, the "List" property is not visible in the Properties window. I would like to expose a "List" property to a user of the control, i.e. a developer plonking my control on to a form.

Unfortunately this is true in VB6 and as far as I know (and I've looked long and hard) there is no solution to this. You can only expose simple properties (not arrays) in the properties window. You can still access it at runtime, though.
0
 
LVL 4

Author Comment

by:WernerVonBraun
ID: 13517798
Bah. If you're right you'll get the 20 points but I hope I'll prove you wrong ;-)
0
 
LVL 4

Author Comment

by:WernerVonBraun
ID: 13621565
Had a word with Karl Peterson and he insists it can't be done. I guess that's as good an authority as you're going to get.

Cheers


Pino
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

801 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