Rockman
Mar 20th, 2002, 03:08 PM
Are there system-wide enums for such things as the Text Alignment Property?
I'm creating my own textbox activex (... I know, I know everybody has done that). When I add the Alignment property with the wizard, for example, it assigns an integer type. I can change the interface to a more standard drop-down box in the object browser with the following code:
Public Enum myAlignment
[Left Justify]
[Right Justify]
[Center]
End Enum
Public Property Get Alignment() As myAlignment
But I'm wondering if there is a system enum such as "vbTextAlignment" that I should use instead. This way if VB10 adds new constants to the property (say, [Justified]) I don't have to go back and change my code.
(Aside: Furthermore, by making two activeX controls, I have to be sure that the Public Enums dont conflict. Hence, I have enums "myTextBoxAlignment" and "myLabelAlignment" in two separate activex controls that define the exact same list of constants... messy)
Any help would be appreciated,
Jeff
I'm creating my own textbox activex (... I know, I know everybody has done that). When I add the Alignment property with the wizard, for example, it assigns an integer type. I can change the interface to a more standard drop-down box in the object browser with the following code:
Public Enum myAlignment
[Left Justify]
[Right Justify]
[Center]
End Enum
Public Property Get Alignment() As myAlignment
But I'm wondering if there is a system enum such as "vbTextAlignment" that I should use instead. This way if VB10 adds new constants to the property (say, [Justified]) I don't have to go back and change my code.
(Aside: Furthermore, by making two activeX controls, I have to be sure that the Public Enums dont conflict. Hence, I have enums "myTextBoxAlignment" and "myLabelAlignment" in two separate activex controls that define the exact same list of constants... messy)
Any help would be appreciated,
Jeff