Binding TreeView and ImageList controls

Binding TreeView and ImageList controls

Anonymous
Not applicable
1,116 Views
7 Replies
Message 1 of 8

Binding TreeView and ImageList controls

Anonymous
Not applicable
I'm trying to bind a ListView control to an ImageList control in a form
inside the Autocad's VBA interface and I can't.

Can anyone help me?.
0 Likes
1,117 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Not like in VB, in ACAD VBA, you bind ImageList to a ListView or TreeView in
your code.
wrote in message
news:9914C1862B0C6A120B7F7CBD75F1473A@in.WebX.maYIadrTaRb...
> I'm trying to bind a ListView control to an ImageList control in a form
> inside the Autocad's VBA interface and I can't.
>
> Can anyone help me?.
>
0 Likes
Message 3 of 8

Anonymous
Not applicable
When I try to execute the next code,

Private Sub UserForm_Initialize()
TreeView1.ImageList = ImageList1
End Sub


I get the message:

"Runtime error 35610"
Invalid Object


The controls exists and the names are OK.

What I'm doing wrong?
0 Likes
Message 4 of 8

Anonymous
Not applicable
Try...

ListImage1.key


Regards,
Jacob Dinardi

wrote in message
news:413C16C85D59B099AE968C19C86A2048@in.WebX.maYIadrTaRb...
> When I try to execute the next code,
>
> Private Sub UserForm_Initialize()
> TreeView1.ImageList = ImageList1
> End Sub
>
>
> I get the message:
>
> "Runtime error 35610"
> Invalid Object
>
>
> The controls exists and the names are OK.
>
> What I'm doing wrong?
>
0 Likes
Message 5 of 8

Anonymous
Not applicable
Scratch that I mis-read your post. Is there the imagelist control licensed
for vba? I have never tried it, but that may be a problem in the same way
the commondialog control is not licensed.


Jacob


"Jacob Dinardi" wrote in message
news:3719B06416B6E6E4EA8DE0F859A49346@in.WebX.maYIadrTaRb...
> Try...
>
> ListImage1.key
>
>
> Regards,
> Jacob Dinardi
>
> wrote in message
> news:413C16C85D59B099AE968C19C86A2048@in.WebX.maYIadrTaRb...
> > When I try to execute the next code,
> >
> > Private Sub UserForm_Initialize()
> > TreeView1.ImageList = ImageList1
> > End Sub
> >
> >
> > I get the message:
> >
> > "Runtime error 35610"
> > Invalid Object
> >
> >
> > The controls exists and the names are OK.
> >
> > What I'm doing wrong?
> >
>
>
0 Likes
Message 6 of 8

Anonymous
Not applicable
I do not see anything wrong with your code. I did the same thing on several
VBA projects. Never run into that runtime error.

wrote in message
news:413C16C85D59B099AE968C19C86A2048@in.WebX.maYIadrTaRb...
> When I try to execute the next code,
>
> Private Sub UserForm_Initialize()
> TreeView1.ImageList = ImageList1
> End Sub
>
>
> I get the message:
>
> "Runtime error 35610"
> Invalid Object
>
>
> The controls exists and the names are OK.
>
> What I'm doing wrong?
>
0 Likes
Message 7 of 8

Anonymous
Not applicable
Sounds like you have not placed any images in your imagelist. At design time select the imagelist control and click on custom in the properties list box and insert some images into it.Hope this helps!

Wendell
0 Likes
Message 8 of 8

Anonymous
Not applicable
Wendell, you are right!!

I put some images in teh ImageList and then the code works.

Thanks a lot to all!!!
0 Likes