|
-
Aug 8th, 2002, 11:16 AM
#1
Thread Starter
Fanatic Member
Best (Image) Combo ever (Picture in UserControl (resolved))
Alright I almost finished my new (image)combo box. It has got lot's of features and I will soon upload it on Planet source code (I will post the link here). But I only got 1 minor problem.
I want the users to be able to select a picture. I have got it in the propertybag but when I select ... and click on a file I get the error
runtime error 450
Wrong number of arguments or invalid property assignment. I can't find it.
I have got an image on the form called ImgItem. What Is wrong. Please help
I use this code:
Dim m_picture As StdPicture
Public Property Get Picture() As StdPicture
Set Picture = m_picture
End Property
Public Property Let Picture(ByVal New_pic As StdPicture)
Set m_picture = New_pic
Set ImgItem.Picture = New_pic
PropertyChanged "Picture"
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set m_picture = PropBag.ReadProperty("Picture", LoadPicture())
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Picture", m_picture, LoadPicture())
End Sub
Last edited by jacsoft; Aug 8th, 2002 at 07:25 PM.
-
Aug 8th, 2002, 02:11 PM
#2
Frenzied Member
I always get this error too when I try to access the picture variable before it has a picture in it. I thought you should be able to use IsEmpty or IsNull or something to find if it has been initialised, but it never seems to work.
-
Aug 8th, 2002, 07:22 PM
#3
Thread Starter
Fanatic Member
I already go it working. Check this out the best (image) combo ever.
Some Feautures:
- Autocomplete
- Adding Images
- Auto show Images (or choose Always or Never), this way it only pretends
to be an ImageCombo if you have inserted at least 1 image
- Removing items by number
- Removing Items by Text
- Sorted (and unsort to get it back the way it was)
- Changing the text of an item (instead of removing and adding the same at
the right place only with another text)
- Changing the picture of an item (instead of removing and adding the same at
the right place only with another picture)
- Locking
- Use Keyboard Keys
- Seraching for Text
- Count Doubles (for example count how much the word "hello"is in the
iscombo
- and much more, to much to tell all here
check it out:
http://www.planet-source-code.com/vb...37746&lngWId=1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|