Seeking advice on best way to build a graphic Control

Viewed 106

I am trying to build a custom control which can draw the outline and pins of an integrated circuit.

At present I am using 2 frames, one holding a panel which will represent the package outline. THis frame will be place on a form. The other frame will represent a pin which will contain a shape to represent the pin and two labels, one for pin number one for pin description. My plan is to create the pins dynamically according to package aspect ratio and number of pins.

Are frames a good basis for this or are there better alternatives.

1 Answers

A frame is a good starting point but is heavy. Probably the best solution is to build a custom control. As ancestor, you could start either with TGraphicControl or TWinControl depending on the features you need. Read the documentation to select the best fit for your case.

TCustomControl which derive from TWinControl is a good ancestor for controls that wrap Windows screen objects but perform their own rendering.

The documentation I linked above gives examples of controls.

Related