Sign in Join
FPDoc Onlineexperiment

TDBImage class

In unit DBCtrls

TDBImage - a data-aware Image box to display a single image from a dataset.

Declaration

pascal
TDBImage = class(TCustomImage)

Inheritance

  1. TDBImage
  2. TCustomImage
  3. TGraphicControl
  4. TControl
  5. TLCLComponent
  6. TComponent
  7. TPersistent
  8. TObject

Description

TDBImage is a TCustomImage descendant which implements a data-aware image control. TDBImage is used to retrieve or save a graphic image in a field in a dataset. The field is generally a Binary Large Object (BLOB). The control allows use of clipboard operations, like Copy/Cut/Paste to add or update the content in the image.

If an application doesn't need the data-aware capabilities of TDBImage, use a TImage control.

TDBImage, like most data-aware controls, provides DataSource and DataField properties to connect the control to a dataset and field. Internally, it uses a TFieldDataLink to maintain an association between the control and its database-related configuration settings.

Use the AutoDisplay, AutoSize, Stretch, Proportional, and Transparent properties to determine the display and sizing behavior for the graphic image.

See also

Properties

FieldpublicDefinition for the field in the linked dataset where the control value is stored.
PictureLoadedpublicIndicates if the graphic content for the data-aware control has been loaded from its linked dataset.
AlignpublishedSpecifies the placement of the control on its Parent control.
AnchorspublishedThe set of anchor definitions for this control.
AntialiasingModepublishedIndicates if anti-aliasing is used when rendering the image.
AutoDisplaypublishedAutoDisplay - if True, automatically displays when focus is given.
AutoSizepublishedAllows automatic adjustment of the size for the control, according to its content.
BorderSpacingpublishedDetermines the inner and outer border spacing for this control.
CenterpublishedIndicates if the image should be centered.
ConstraintspublishedContains the minimum and maximum Width and Height for the control.
DataFieldpublishedContains the name of the field with the value for the control.
DataSourcepublishedProvides access to the dataset with content for the control.
DragCursorpublishedThe cursor shape shown during a drag operation.
DragKindpublishedIndicates the action performed for a drag operation: drag-and-drop or drag-and-dock.
DragModepublishedDetermines how a drag operation is started for the control.
KeepOriginXWhenClippedpublishedPreserves the Left coordinate when a clipped image is centered.
KeepOriginYWhenClippedpublishedPreserves the Top coordinate when a clipped image is centered.
ParentShowHintpublishedIf True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
ProportionalpublishedTrue if image is proportional.
QuickDrawpublishedQuickDraw - if True, quick drawing is implemented.
ReadOnlypublishedIndicates if the control cannot modify the image in the field for the linked dataset.
ShowHintpublishedEnables Hint display for the control.
StretchpublishedIndicates if the image is resized to the client area for the control.
StretchInEnabledpublishedAllows the image to be resized proportionally when the image drawing area is shrunk.
StretchOutEnabledpublishedAllows the image to be resized proportionally when the image drawing area is expanded.
TransparentpublishedIndicates if the image has a clear, non-opaque background.
VisiblepublishedAllows the control, and all of its children, to be displayed or hidden.
WriteHeaderpublishedWrite a header in the image stream.
PopupMenupublishedA context-sensitive menu that pops up when the right mouse button is clicked over this control.

Methods

NotificationprotectedHandles notifications when a component in the class instance is added or removed.
DataChangeprotectedPerforms actions needed when the content in the linked dataset has been changed.
UpdateDataprotectedPerforms actions needed to validate and store the content for the image control.
PictureChangedprotectedPerforms actions needed when the Picture property in the image control has been changed.
WSRegisterClassprotectedRegister the component class with the widgetset.
DoCopyToClipboardprotectedImplements the clipboard Copy (Ctrl+C) command.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
ExecuteActionpublicProvides support for TBasicAction in the control.
UpdateActionpublicUpdates the specified action to reflect the current state in the linked dataset.
ChangepublicNotifies the linked dataset when the value in the control is changed.
LoadPicturepublicLoads the graphic content for the control from a field in the linked dataset.
CopyToClipboardpublicPerforms actions needed for the Clipboard Copy (Ctrl+C) command.
CutToClipboardpublicPerforms actions needed for the Clipboard Cut (Ctrl+C) command.
PasteFromClipboardpublicPerforms actions needed for the Clipboard Paste (Ctrl+V) command.

Events

OnClickpublishedNotification handler for mouse clicks.
OnContextPopuppublishedInvoked when a context-sensitive pop-up menu is requested.
OnDblClickpublishedEvent handler signalled when a mouse double click occurs in the control.
OnDBImageReadpublishedEvent to read a custom header from image stream.
OnDBImageWritepublishedEvent to write a custom header into image stream.
OnDragDroppublishedEvent handler signalled when an object is dropped onto the control.
OnDragOverpublishedEvent handler signalled when a control is dragged over the control instance.
OnEndDragpublishedEvent handler signalled for the end of a drag-drop operation.
OnMouseDownpublishedEvent handler signalled when a mouse down event is handled for the control.
OnMouseEnterpublishedEvent handler signalled when the mouse pointer has entered the control.
OnMouseLeavepublishedEvent handler signalled when the mouse pointer has left the control.
OnMouseMovepublishedEvent handler signalled when the mouse pointer is moved in the control.
OnMouseUppublishedEvent handler signalled when a mouse up event is handled for the control.
OnMouseWheelpublishedEvent handler for mouse wheel turned.
OnMouseWheelDownpublishedEvent handler signalled for a downward movement of the mouse wheel.
OnMouseWheelUppublishedEvent handler signalled for an upward movement of the mouse wheel.
OnResizepublishedNotification handler for a resize of the control.
OnStartDragpublishedEvent handler signalled for the start of a dragging operation.

Inherited

From TCustomImage (13)

CalculatePreferredSize Canvas DestRect GetControlClassDefaultSize HasGraphic ImageIndex Images ImageWidth Invalidate OnPaintBackground OnPictureChanged Paint Picture

From TGraphicControl (5)

CMCursorChanged DoOnChangeBounds DoOnParentHandleDestruction FontChanged OnPaint

From TControl (379)

AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BiDiMode BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize CanTab Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed ChangeScale CheckChildClassAllowed CheckNewParent CheckOnChangeBounds ChildClassAllowed Click ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMBiDiModeChanged CMChanged CMEnabledChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CMVisibleChanged CNPreferredSizeChanged Color ColorIsStored ConstrainedResize ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DialogChar DisableAutoSizing DoAllAutoSize DoAutoAdjustLayout DoAutoSize DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoConstraintsChange DoContextPopup DoDock DoDragMsg DoEndDock DoEndDrag DoFixDesignFontPPI DoFloatMsg DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnResize DoOnShowHint DoScaleFontPPI DoSetBounds DoStartDock DoStartDrag DragCanceled DragDrop Dragging DragOver EditingDone EnableAutoSizing Enabled EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass Font ForeignAnchorSideChanged FormEndUpdated FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetChildrenRect GetClientOrigin GetClientRect GetClientScrollOffset GetColorResolvingParent GetControlOrigin GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDeviceContext GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMouseCapture GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTextLen GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsClientHeightStored IsClientWidthStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged Loaded LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseDown MouseEnter MouseInClient MouseLeave MouseMove MouseUp OnChangeBounds OnConstrainedResize OnEditingDone OnEndDock OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnQuadClick OnShowHint OnStartDock OnTripleClick Parent ParentBackground ParentBiDiMode ParentColor ParentDestroyingHandle ParentFont ParentFontChanged ParentFormHandleInitialized ParentHandlesAllocated ParentToClient Perform PositionDockRect QuadClick ReadBounds ReadState RealGetText RealSetText Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging Repaint ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendMoveSizeMessages SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBounds SetBoundsKeepBase SetColor SetCursor SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTempCursor SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth Update UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMContextMenu WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMMove WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMSize WMWindowPosChanged WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp WndProc WriteLayoutDebugReport

From TLCLComponent (6)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass

From TComponent (63)

_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (4)

Assign FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (36)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.