Not sure if this is fixed in 2.2 already but in 2.1.2 the following occurs.
I assign a styleClass to a rectangle and it uses the properties of my stylesheet.
I can go out of design mode and all still works.
I even hit the save button in the toolbar to make sure the solution saves my changes.
I quit Servoy and relaunch and load the solution: styleClass is empty.
Other assigned styleClasses to non-rectangles are still there.
Can anyone confirm this bug?
Servoy Developer
Version R2 2.1.2-build 315
Java version 1.4.2-38 (Mac OS X)
I wouldn’t even use rectangles. Just use labels, it works very well there.
That would be a workaround that would work in a lot of cases.
But the fact of the matter is that it should remember the styleClass.
For instance you wouldn’t be able to use styles on ovals (labels can’t be used then
)
In my eyes, those drawing tools a fairly useless and I don’t use them, because I fear that one day they will be abandoned. All I use is labels.
I think that an oval is nothing more than a label with a special matte border like
SpecialMatteBorder,1.0,1.0,1.0,1.0,#000000,#000000,#000000,#000000,50.0,
The 50.0 is the radius. I am not sure if you can create an oval using a style, but you can “draw” one using a label and apply styles, can’t you?
It’s indeed a small bug, styleClass is not implemented on a rectangle object. We are thinking of removing the styleClass property on a rectangle or are there reasons to keep it?
Jan Block:
It’s indeed a small bug, styleClass is not implemented on a rectangle object. We are thinking of removing the styleClass property on a rectangle or are there reasons to keep it?
Apart from that it does work with the styleClass property?
It only doesn’t save this property.
But yeah. I moved to using labels now. (thanks Patrick)