[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Vector drawing component for Delphi?

Posted on 1997-04-02
3
Medium Priority
?
1,362 Views
Last Modified: 2008-03-03
As part of developing a quotation system for our product, we would like to generate a simple line drawing of the item the user is interested in. This would mostly be a simple shape (square, rectangle, semi-circle) of arbitrary dimensions, with different border widths, border colors, and fill pattern.

In addition, we would like to generate several shapes, and have the user move them around on the screen-- not edit or change the shape, just move several shapes in relation to each other.

Is anyone aware of a component or add-on that would allow on-the-fly generation of (relatively) simple shapes/line-drawings within a Delphi app?

Any ideas? Comments? Suggestion? Thanks in advance.
0
Comment
Question by:loewen
  • 2
3 Comments
 

Expert Comment

by:morwoodk
ID: 1335095
Look under the 'Additional' tab of the component toolbar.  There is a component called TShape there.  These can be squares, ellipses and so on.  Once you drop the component on the canvase you can move it around.  You can also create instances of it on the fly.
0
 

Author Comment

by:loewen
ID: 1335096
I am aware of the design-time shape components. However, we need to generate a shape (typically a frame consisting of several overlapping rectangles) and allow the user to move it around in relation to other shapes he has already defined.

(i.e. ok, our product is windows. The user chooses a window size, and grille type, and we generate a simple line drawing (but to scale) of the window, including grille pattern. To create a combination window, you define several single windows, and drag them together to create the one combination unit)

Is there a way to create the shapes, and still allow the user to drag them around at run-time?

Dave Lehman
(davelehman@loewen.com)
0
 

Accepted Solution

by:
morwoodk earned 300 total points
ID: 1335097
Yes, while I haven't had time to actually do it...you should be able to create an instance of the TShape on the form and hook it to some generic pick and drag code.

It actually sounds like fun.  I'll try it myself and let you know.  

If you want to get started yourself you would do something like:

aSquare := TShape.create( aOwner)
{ set the various attributes progammatically }
{ set the parent to the form ... so that the object shows up }
{ set some event handlers to methods you've written to handle mouse clicks and so on.}

Kev.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 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