Results 1 to 4 of 4

Thread: User Control as Property

Threaded View

  1. #1

    Thread Starter
    Lively Member StoneTheCrows's Avatar
    Join Date
    Dec 2004
    Location
    UK
    Posts
    71

    Cool User Control as Property

    I am Having a problem using a UserControl as a Property for another UserControl.

    Scenario:

    ActiveX Library containing UserControls: cDataTable and cDataDisplay

    cDataTable has an array of 100 Variants called Value.
    cDataDisplay Is a kind of Label that will monitor and display ONE Value element from an Instance of cDataTable.

    cDataDisplay has Properties:

    SourceTable as cDataTable with Get and Set Property Procedures
    SourceIndex as Integer with Get and Let Property Procedures

    So, cDataDisplay can access its SourceValue by :
    Code:
     myValue = mySourceTable.Value(mySourceIndex)
    This all works fine if the end user sets the SourceTable property of the cDataDisplay in code in his form load event or somewhere similar.

    However, I do not want the end user to have to do that, I want him to be able to select the Instance of cDataTable for the SourceTable property from a drop down list of cDataTables on his form in the Properties window.

    I have done this successfully in C++ and VB.NET with no special coding beyond the correct Property procedures. Why wont the SourceTable Property display in the Properties window?

    I have tried this every which way I can think of in VB6, but I suspect I am just being thick.

    I would appreciate any helpful comments.
    Last edited by StoneTheCrows; Dec 23rd, 2004 at 07:35 AM.
    StoneTheCrows

    _______________

    The future will be better tomorrow. (George W. Bush)

    (If you think my post was useful, please Rate it. Thanks)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width