Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Developers Express TOrgChart Shape Help?

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
shaneholmes
Asked:
shaneholmes
  • 7
  • 4
  • 2
1 Solution
 
kretzschmarCommented:
listening . . .
0
 
CesarioCommented:
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
 
shaneholmesAuthor Commented:
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
shaneholmesAuthor Commented:
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
 
CesarioCommented:
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
 
shaneholmesAuthor Commented:
Cesario ,

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

Shane
0
 
shaneholmesAuthor Commented:
shane@holmes.net
0
 
shaneholmesAuthor Commented:
Great Job,

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

Thanks Again!
0
 
kretzschmarCommented:
atleast, other may also see the solution
0
 
shaneholmesAuthor Commented:
Right,

And I will when the changes are done!

0
 
CesarioCommented:
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
 
CesarioCommented:
Shane,

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

Best Regards

Cesario
0
 
shaneholmesAuthor Commented:
Right,

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

Shane
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 7
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now