General information
Category:
Forms & Form designer
Dragos-
How's life treating you? I had the pleasure of visiting Romania last year (Cluj Nopaca) and really enjoyed it. Reminded me a lot of my home town which is New Mexico.
>1)Create an object containing the borders, a picture and a label
I think this is more flexible than making a BMP with text that would be my caption. It's easier to change the caption, and you can subclass it for general purposes.
I'd use a container class with the image and label. It won't really *look* quite like a button, though you can overlay a shape that aligns top and left, but is a pixel bigger to give it a shadowy look. The other interface difference is that it won't look like it pushes though, again, you could probably mimic this. OTOH, it might just look like one of the new cool, flat buttons.
Frankly, I'd probably try something different. Have a button, a label, and an image in a container (to encapsulate the funtionality). I'd make the button blank (no picture, no caption). Put the image and label on top of the button. Then in each method and event of the label and image, pass through the even to the button.
Warning. I haven't actually done this, but it seems far easier than trying to make something that's not a button look like a button or tying myself to text in a bmp, which never looks quite right to my eyes.
>2)Create a new ActiveX control
>
>For the second option I would be more interested. If you happen to know about working this out in Visual Basic or Visual C++ please let me know.
Yep. This is a good idea, though there might already be something like this. I haven't make an ActiveX control in VB so I'm afraid I can't help here.
>If you don't mind I have another question for you: how can I add in the class designer a property to a class that is in fact an array. If I try to dimension it in the init event I get an error.
That one's easy <g>. When you add the property put [1] after it. Like so: MyArrayProp[1]. Then dimension it during runtime to whatever you need. In code it's simple, too.
DEFINE CLASS MyClass
DIMENSION MyArrayProp[1]
etc.
HTH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only