|
-
Oct 10th, 2001, 09:37 PM
#1
Thread Starter
Frenzied Member
ActiveX Control Properties
I used the wizard to add properties to my control but when when I put them in I don't get the drop-down color menu or the alignment choices dropdown. How can I fix this?
-
Oct 10th, 2001, 09:58 PM
#2
Member
Does the Alignment thing work if the property is an Enum?
-
Oct 11th, 2001, 08:45 AM
#3
Thread Starter
Frenzied Member
i've got the stuff in an enum and tryed making the variable in the property the enum but that didn't work so i tryed doing it to the whole property, that still didn't work. what should i do?
-
Oct 11th, 2001, 02:51 PM
#4
Fanatic Member
When I have this in a usercontrol, the dropdown list with 0-a 1-b etc. will appear in the property window.
VB Code:
Public Enum X
a
b
c
d
End Enum
Private Y As X
Public Property Get Z() As X
Z = Y
End Property
Public Property Let Z(ByVal NewZ As X)
Y = NewZ
End Property
Is that not working for you, or was yours different? To get the color palette to appear, you have to have something similar to this:
VB Code:
Public Property Get Z() As OLE_COLOR
Z = somelongvar
End Property
Public Property Let Z(ByVal NewZ As OLE_COLOR)
somelongvar = NewZ
End Property
The important part is the type, which is OLE_COLOR. It's actually a long, but when named like that, the palette will appear in the property window. The standard dialogs will appear in the property window for font and picture if you use the types "Font" and "Picture" specifically like OLE_COLOR was used above. They're both objects, but the property can use ByVal on them, and I've never seen it done otherwise. If you use ByRef or leave out ByVal, you may get some weird effect(s) since a separate copy of the object isn't being made.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Oct 11th, 2001, 03:44 PM
#5
Thread Starter
Frenzied Member
thanx dude works great now
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
|