Results 1 to 4 of 4

Thread: Persisiting an array via PropertyBag

  1. #1

    Thread Starter
    Lively Member BradBrening's Avatar
    Join Date
    Oct 2001
    Location
    Gillespie, IL
    Posts
    102

    Question Persisiting an array via PropertyBag

    I am creating an ActiveX control that will allow a developer to add constituent controls at design time. I need to be able to put into the PropertyBag the state of each of the constituent controls (i.e. top, size, color, etc.) as well as the count of the constituent controls added. How would this be accomplished?

    As far as I can tell, the only thing that can be saved into the Propertybag is a key/value pair. I know that objects can be used as the value, but does this include user-defined objects? And although I can iterate through the constituent control collection/array and perform a WriteProperty, how do I iterate through during ReadProperties to the upperbound of the array?

    I hope I haven't muddled up this question too much, this issue has really got me scratching my head. I cannot seem to find any documentation that addresses this issue.

    Any help or insight would be greatly appreciated! Thanks in advance!

  2. #2

    Thread Starter
    Lively Member BradBrening's Avatar
    Join Date
    Oct 2001
    Location
    Gillespie, IL
    Posts
    102

    Thumbs up

    AAAGGGHHHH! I should have known that answer! Thanks a ton for your assistance. This just reinforces the idea that the answer is usually right under your nose...

    Once again, thanks a ton!

  3. #3
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Orlando
    Posts
    392

    Hey Jim

    Ever tried that code?
    A collection is not persistable, nor the controls. Try it.
    Abu Haider
    ____________________________
    100% Data Validation for the MS DataGrid Control. Plus Support for Custom and Foreign Lists, DatePicker and much more...
    The DataGridEnhancer


    I often point to a place where the problem has been discussed, instead of giving you the code that solves it. This is for good, may be you will understand some day...

  4. #4
    jim mcnamara
    Guest
    Abu - I think Brad answered your question.

    Brad - have no clear idea. What appears in Intellisense is derived from the type library associated with the class object.

    You are going to have to create your own .tlb for your project.
    You can get idl from MDSN online, so you can compile it, at least.

    Abu - since you're helping, too - any ideas? I'm all out.

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