DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question about arrows

 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
zippi
Member


Joined: 19 Jul 2006
Posts: 2

PostPosted: 19/07/06 10:10    Post subject: Question about arrows Reply with quote

Hello,
first, please excuse my bad English.
I have follow Question: I want to change the Arrow in lsnone, the Source is working, but nothing changed.
Please can you help me!

Thank you!

Code:
procedure TMainForm.sBitBtn1Click(Sender: TObject);
   var arrow : tgraphlink;
       first,last:tlinkbeginendstyle;
begin
   first:=lsnone;
   last:=lsnone;
     try
         arrow:=tgraphlink.Create(simplegraph);
             arrow.BeginStyle:=first;         
             arrow.EndStyle:=last;
         SimpleGraph.CommandMode := cmInsertLink;
     finally
         arrow.Free;
     end;
end.
Back to top
View user's profile Send private message
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1231
Location: Tehran, Iran

PostPosted: 04/08/06 13:43    Post subject: Reply with quote

You did it in a wrong way. You should use OnObjectInitInstance event to change default properties of an object.

Code:
procedure TForm1.SimpleGraph1ObjectInitInstance(Graph: TSimpleGraph;
  GraphObject: TGraphObject);
begin
  if GraphObject is TGraphLink then
    with TGraphLink(GraphObject) do
    begin
      BeginStyle := lsNone;
      EndStyle := lsNone;
    end;
end;

_________________
Kambiz

Back to top
View user's profile Send private message Send e-mail Visit poster's website
zippi
Member


Joined: 19 Jul 2006
Posts: 2

PostPosted: 07/08/06 12:07    Post subject: Reply with quote

Kambiz wrote:
You did it in a wrong way. You should use OnObjectInitInstance event to change default properties of an object.

Code:
procedure TForm1.SimpleGraph1ObjectInitInstance(Graph: TSimpleGraph;
  GraphObject: TGraphObject);
begin
  if GraphObject is TGraphLink then
    with TGraphLink(GraphObject) do
    begin
      BeginStyle := lsNone;
      EndStyle := lsNone;
    end;
end;



Hello Kambiz!

Thank you for the advice to the right way. It works great. Wink

Zippi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group