tssCircleShapes not draggable across axes in design mode

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
JackLeslie
Newbie
Newbie
Posts: 20
Joined: Sat Oct 04, 2003 4:00 am

tssCircleShapes not draggable across axes in design mode

Post by JackLeslie » Tue Feb 28, 2006 5:09 am

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

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Mon Mar 06, 2006 9:31 pm

strange, I'm not experiencing this problem

JackLeslie
Newbie
Newbie
Posts: 20
Joined: Sat Oct 04, 2003 4:00 am

Post by JackLeslie » Mon Mar 06, 2006 10:24 pm

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;

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Mon Mar 06, 2006 10:42 pm

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

JackLeslie
Newbie
Newbie
Posts: 20
Joined: Sat Oct 04, 2003 4:00 am

Post by JackLeslie » Tue Mar 07, 2006 6:10 am

? 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

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Wed Mar 08, 2006 9:37 pm

I just copied your code and run it. Then I dragged it as with any other shape.

JackLeslie
Newbie
Newbie
Posts: 20
Joined: Sat Oct 04, 2003 4:00 am

Post by JackLeslie » Fri Mar 10, 2006 2:20 am

I would still appreciate a pointer into the code itself .. where should I look for the code that handles the shape dragging ?

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Sun Mar 12, 2006 11:10 am

Check for DoMove method

Post Reply