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
tssCircleShapes not draggable across axes in design mode
-
- Newbie
- Posts: 20
- Joined: Sat Oct 04, 2003 4:00 am
-
- Newbie
- Posts: 20
- Joined: Sat Oct 04, 2003 4:00 am
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;
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;
-
- Newbie
- Posts: 20
- Joined: Sat Oct 04, 2003 4:00 am
-
- Newbie
- Posts: 20
- Joined: Sat Oct 04, 2003 4:00 am