Componentes - porque o TEdit e o TPanel nao tem canvas |
Top Previous Next |
|
All descendents of TCustomControl have a Canvas property, however, most are protected to prevent 'outsiders' from drawing on the component. Descendents of a component can always access the protected properties they inherit from the component (such as Canvas), but users of the component cannot.
type TCanvasPanel = class(TPanel) public property Canvas; end;
If you want to draw on a component that doesn't have a public canvas property, consider using a different component that was intended for arbitrary drawing (TPaintBox), or layer components to achieve the desired result (client-align a TPaintBox inside a TPanel to get a bevelled, drawable area). |