Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185

    Question Unanswered: Problem adding new image to imagelist control at runtime

    Hi everybody,
    I use the following code in my form to add new images to my Imagelist control in order to be used by my Treeview control
    Code:
    me.imgLst0.ListImages.Add Key:="Test112", Picture:=LoadPicture("C:\1.jpg")
    it works fine and it add new images to imagelist but it does not save them, Imean after closing the form when I check the list it is not added!
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    When items are added to a List, Combobox, etc, at Runtime, the addition only remains as long as the Form is open. For the addition to persist after the Form is closed then opened again, you have to have the Form opened in Design View while the items are added, or have a Table as the Source for the Control, and add the items to the Table.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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