Page 1 of 1
tssCircleShapes not draggable across axes in design mode
Posted: Tue Feb 28, 2006 5:09 am
by 7728099
hi
Try the following. In the IDE drop a standard rectangular shape and another of style tssCircle (aka ellipse) on the tree. Then at run time set the tree into designing mode and drag those shapes around.
Once the ellipse goes into negative coordinate space (ie left of 0,0) it is no longer draggable into positive coordinate space. You can confirm that it is the shape code at fault by simply having a button that will change nodes of style tssCircle to tssRectangle. The formerly locked ellipse, now a rectangle, is once again draggable
Posted: Mon Mar 06, 2006 9:31 pm
by Tom
strange, I'm not experiencing this problem
Posted: Mon Mar 06, 2006 10:24 pm
by 7728099
drag the ellipse across the axes into negative territory. Then mouseup/click somewhere else.
When you go back to the ellipse, it is no longer draggable by its "text box" (it is by its folder icon, if it has one)
I just reproduced it again, in a fresh app, in code. See below. The code does not do the dragging, you have to try to do that <g>
procedure TForm1.FormCreate(Sender: TObject);
var tree1 : TTree;
var anode : TTreeNodeshape;
begin
tree1 := TTree.create(self); tree1.parent := self;
tree1.visible := true;
tree1.left := 200; tree1.Top :=200;
tree1.height :=200; tree1.width :=200;
tree1.designing := true;
with tree1 do begin
anode := add('a simple rectangle');
anode.style :=tssRectangle;
anode.autosize := true;
anode := add('a simple ellipse');
anode.style :=tssCircle;
anode.autosize := true;
anode.autoposition.left:= false;
anode.autoposition.top:= false;
anode.MoveRelative(-60,-60,false);
{ this ellipse is NOT draggable by its "body"
ie its text area. It IS draggable by its folder icon.
}
end;
Posted: Mon Mar 06, 2006 10:42 pm
by Tom
JackLeslie,
again, I've no problem dragging this ellipse. (yes I'm dragging with its body)
It is a really weird thing you are experiencing, since there is no difference in the coding of dragging these shapes.
regards,
tom
Posted: Tue Mar 07, 2006 6:10 am
by 7728099
? you made sure that you did not have it selected initially?
?and it was in negative co-ordinate space?
I know that the polygon shape is coded differently, maybe ellipse is treated as a polygon??
which routine handles the mouse drag stuff? I would like to look at the code
thanks
Posted: Wed Mar 08, 2006 9:37 pm
by Tom
I just copied your code and run it. Then I dragged it as with any other shape.
Posted: Fri Mar 10, 2006 2:20 am
by 7728099
I would still appreciate a pointer into the code itself .. where should I look for the code that handles the shape dragging ?
Posted: Sun Mar 12, 2006 11:10 am
by Tom
Check for DoMove method