?
Solved

Combo Box "List" property

Posted on 2005-03-11
4
Medium Priority
?
192 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
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

621 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