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 

About SimpleGraph Component...plz Help me

 
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
ZarrinPour
Member


Joined: 28 Sep 2003
Posts: 11

PostPosted: 15/11/06 08:56    Post subject: About SimpleGraph Component...plz Help me Reply with quote

Hi all
Special Thanks to Kambiz for his free and nice component (Tsimple Graph).i was looking for such diagram component and all of a sudden , i came accros this component.it was cool But i have a question???
as i surfed the source code all Graphic nodes are descendent of TgraphNode-->TgraphObject-->TPersistant .

now i want to know is it possible for me to create a custom node like RoundRectangularNode BUT with following specifications:
"This node should has two sections, one for a TLable component and another section for a TEdit component"

In the other hand i want to have a RoundRectangularNode with one Lable and one EditBox inside it !!! Is it possible to do at all?
Could anyone help me please?

Any help greately would be appreciated.
Kind Regards.

Crying or Very sad
Back to top
View user's profile Send private message
Johnny_Bit
Administrator


Joined: 15 Jun 2003
Posts: 347

PostPosted: 15/11/06 16:38    Post subject: Reply with quote

built it just like TLabeled Edit. simple, yet good.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ZarrinPour
Member


Joined: 28 Sep 2003
Posts: 11

PostPosted: 16/11/06 05:27    Post subject: Reply with quote

Johnny_Bit wrote:
built it just like TLabeled Edit. simple, yet good.


Hi friend... could you please explain more. if you don't mind.
Kind Regards.
Back to top
View user's profile Send private message
Johnny_Bit
Administrator


Joined: 15 Jun 2003
Posts: 347

PostPosted: 16/11/06 16:35    Post subject: Reply with quote

Well, as a matter of fact, I'm no simplegraph guy, you should wait till Sunday for Kambiz, as he's the one with the code.

//Edit after Kambiz Posted:
HAIL TO THE KAMBIZ, THE ONE WITH THE CODE!


Last edited by Johnny_Bit on 19/11/06 14:19; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kambiz
Administrator


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

PostPosted: 19/11/06 12:33    Post subject: Reply with quote

More explanation means writing the full code. Confused

Anyway, in the constructor of your node, you create a TLabeledEdit control and initialize it (You should set control's parent to SG), then you free it in the destructor. Move the control whenever the node is moved or resized.

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


Joined: 28 Sep 2003
Posts: 11

PostPosted: 23/11/06 08:29    Post subject: Reply with quote

Kambiz wrote:
(You should set control's parent to SG)


Hi Kambiz
Thanks for your Attention.
To tell the truth, before i started this thread and as i said earlier, i surfed your code and created a simple node(just copy & paste ur code with diffrent name) after that as you said i initialized the node and in constrtuctor i created a TEdit Component and....BUT this TEdit'parent is Simple Graph so no wonder that this TEdit will appear inside SimpleGraph not inside the node. in fact i want a node with one TEdit Control (VCL) inside it so if node moves , this Tedit and other visual control inside the node will moved without any line of code.I hope you understand my meaning.

Kind Regards.
Back to top
View user's profile Send private message
Kambiz
Administrator


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

PostPosted: 23/11/06 18:57    Post subject: Reply with quote

SimpleGraph's nodes are not windowed control, therefore you should adjust the placement of the Edit control by yourself.
_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Johnny_Bit
Administrator


Joined: 15 Jun 2003
Posts: 347

PostPosted: 23/11/06 20:43    Post subject: Reply with quote

Kambiz wrote:
SimpleGraph's nodes are not windowed control, therefore you should adjust the placement of the Edit control by yourself.


And before you may ask: It can be done while node is on the move, by using event coordinates, just don't tell us it's too hard to assign two properties to appropriate values. Another question may come by regarding possible flickering: set DoubleBuffered to true, In most cases it helps.

//To Kambiz: You wanted to rewrite SG to GDI+? I'm sure that effects of this would not only help SG gain some neat looks, but it would draw itself faster, and that's sometimes a big issue.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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