TSimpleGraph - Changes in property top, left, height, width

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TSimpleGraph - Changes in property top, left, height, width

Postby Athabasca » January 30th, 2009, 12:53 pm

I use Simple Graph v2.71
Changes in dimension of the TRectangularNode (top, left, height or width) the property's,
change only the selection rectangle in the editor. The rectangle remains unchanged.

SG_Rect.png
SG_Rect.png (6.22 KiB) Viewed 1329 times

With other Objects (TRoundRectangularNode and TEllipticNode) it works smoothly.
Any idea?

I use Delphi 2009 and Vista.

Thank you for the great Components!
User avatar
Athabasca
Active Member
Active Member
 
Posts: 15
Joined: January 30th, 2009, 10:55 am
Location: Germany

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Kambiz » January 30th, 2009, 3:04 pm

I couldn't regenerate the problem on Delphi 2009 and Vista. :?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Kambiz » January 30th, 2009, 3:08 pm

By the way, regarding other problem mentioning in your email...

The OnCloseQuery event handler of the form needs to be revised to the following code:

Code: Select all
procedure TMainForm.FormCloseQuery(Sender: TObject;var CanClose: Boolean);
begin
  if IsGraphSaved then
  begin
    SimpleGraph.Clear;
    CanClose := True;
  end
  else                           // was missing
    CanClose := False;           // was missing
end;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Athabasca » January 30th, 2009, 3:23 pm

The changes i make in the Node Property Dialog are in the attachment.
Attachments
NodeProp.rar
(10.42 KiB) Downloaded 75 times
User avatar
Athabasca
Active Member
Active Member
 
Posts: 15
Joined: January 30th, 2009, 10:55 am
Location: Germany

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Kambiz » January 30th, 2009, 4:40 pm

Not only TRectangularNode, but also all other nodes suffering from that problem.

On line #6142 of SimpleGraph.pas, replace

Code: Select all
      if not IsUpdateLocked then
        BoundsChanged(dX, dY, dCX, dCY)
      else
        Changed([gcView, gcData, gcText, gcPlacement]);

with

Code: Select all
      BoundsChanged(dX, dY, dCX, dCY);

Thank you for reporting the bug.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Kambiz » January 30th, 2009, 4:42 pm

It is better to use SetBounds method instead of setting Left, Top, Width, and Height properties individually.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph - Changes in property top, left, height, width

Postby Athabasca » January 30th, 2009, 4:55 pm

Thank you, it works fine. :mrgreen:
User avatar
Athabasca
Active Member
Active Member
 
Posts: 15
Joined: January 30th, 2009, 10:55 am
Location: Germany


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 2 guests

cron