Solved

Developers Express TOrgChart Shape Help?

Posted on 2002-05-07
13
160 Views
Last Modified: 2010-04-04
I need to create custom shapes in Developers Express TOrgChart. If you have done this, or have the source code of this component and can do it, there will be 500 points available. What I need is a Octagon and a Triangle.


Thanks - and good luck!
P.S. Bonus points to the one who provides all the same functionality as the other shapes.
0
Comment
Question by:shaneholmes
  • 7
  • 4
  • 2
13 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6995683
listening . . .
0
 
LVL 8

Expert Comment

by:Cesario
ID: 6995830
hello shaneholmes,

I dont have the source code. But after displing the demo of TOrgChart I found that they use the standart TShape Component.

If you can get the Sourcecode so replace the TShape Component with TManyShape(TManyShape is a TGraphicControl descendant similiar to TShape, but adding new shapes (Diamond, Triangle, Star, Polygon))

http://www.torry.net/vcl/shapes/enhancedshapes/manysh.zip

good luck

Cesario
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 6997232
No,

It does not use TShape to draw its shapes.

In the source, a new type is declared:

TdxOcShape = (shRectangle, shRoundRect, shEllipse, shDiamond);

and its clear that they draw the shapes using the canvas methods such as :

shEllipse: Cnv.Ellipse(R.Left, R.Top, R.Right, R.Bottom);

shRoundRect:
        begin
          Rad := Node.Radius;
          Cnv.RoundRect(R.Left, R.Top, R.Right, R.Bottom,    Rad, Rad);
        end;


 shDiamond:
        begin
          Pts[0].X := R.Left; Pts[0].Y := R.Top + (R.Bottom - R.Top) shr 1;
          Pts[1].X := R.Left + (R.Right - R.Left) shr 1; Pts[1].Y := R.Top;
          Pts[2].X := R.Right - 1; Pts[2].Y := Pts[0].Y;
          Pts[3].X := Pts[1].X; Pts[3].Y := R.Bottom - 1;
          Cnv.Polygon(Pts);
        end;


Thanks for the attempt though - :)


Shane
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 11

Author Comment

by:shaneholmes
ID: 6997236
BTW, if someone wants to attempt to do this for me, email me directly at shaen@holmes.net and i will work with you with the source code.

Shane
0
 
LVL 8

Accepted Solution

by:
Cesario earned 500 total points
ID: 6997296
Dear shaneholmes,

I can do it for you. But I need the source code.
Please send it to C_Lababidi@Hotmail.com

Best Regards

Cesario
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 6997374
Cesario ,

Your email is bouncing back to me. Please send me a a valid email address

Shane
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 6997377
shane@holmes.net
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 7002250
Great Job,

If you make the required changes I requested, there is the bonus as well.

Thanks Again!
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7002403
atleast, other may also see the solution
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 7002760
Right,

And I will when the changes are done!

0
 
LVL 8

Expert Comment

by:Cesario
ID: 7002906
Hi Meikl,

I think it´s not possible to post the Modification of the Source copy ( Copyright ) here. I am sure Shane can post you the new code.

Cesario
0
 
LVL 8

Expert Comment

by:Cesario
ID: 7002908
Shane,

I still have some Problems with the Star Shape. But I wil fix it totday.

Best Regards

Cesario
0
 
LVL 11

Author Comment

by:shaneholmes
ID: 7006287
Right,

No plans on posting the entire source listing. Just the changes.

Shane
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question