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?
Printable View
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?
Does the Alignment thing work if the property is an Enum?
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?
When I have this in a usercontrol, the dropdown list with 0-a 1-b etc. will appear in the property window.
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 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
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.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
thanx dude works great now