Hi,
I have a group of three boxes (modelbox (50% transparent), graphicbox (100% opaque), textbox (100% transparent, black text)) which have zorder set so that modelbox>graphicbox>textbox.
The group is created using:
graphicBox.AttachTo(modelBox, 0, 0, 100, 100); textBox.AttachTo(modelBox, 0, 100, 100, 150);
The first weird thing is that this line doesn't update the position of the attaching object until I move the modelbox in some way, then the two others jump to the attach position.
Also, when I move the textbox it allows me to move it around, and leaves it there until I move the modelbox again, whereby it snaps back to the above relative position.
The behaviour I was expecting was that the initial AttachTo would put the attaching box in the right place initially. Moving the textbox would work as it does now, and then when modelbox is moved textbox keeps the new relative position. I've solved this last problem myself by explicitly recaltulating the %'s and recalling AttachTo in the BoxModified handler.
The other problem is related to selection. When the modelbox is selected, even though its zorder is higher than graphicbox, the graphicbox is shown on top (with the selection indicators around the modelbox.)
Thanks.
|