Description


The component is used to save images to the database. Supported formats: jpg, bmp, gif, png8, png24.



Class: TdbImageDataBase



Properties

 Property

 Type

 Description

 dbCopyTo

 String

 Allows you to specify where you want the file to be copied automatically. More info.

 dbFileName

 String

 If the Type = LinkFile property, then the property returns the full path of the file location, if the CopyTo property is also defined, then the property returns the file path relative to the database file location (only for SQLite). If Type = StoreFile, then the property returns the location of the file when it is saved to the database.

 dbImageIsChanged

 Boolean

 If the property returns True, it means that the picture file in the component has been changed.

 dbInitialDir

 String

 Allows you to set the default path for the open and save file dialog.

 dbShowButtons

 Boolean

 Allows you to hide the buttons on a component that appear when you hover your cursor.

 AutoSize

 Boolean

 Specifies whether the control sizes itself automatically to accommodate the dimensions of the image.

 ButtonOpen

 TToolButton

 Access the properties of the "Open" button.

 ButtonSave

 TToolButton

 Access the properties of the "Save" button.

 ButtonDelete

 TToolButton

 Access the properties of the "Delete" button. 

 Center

 Boolean

 Indicates whether the image is centered in the image control.

 Cursor

 TCursor

 Specifies the image used to represent the mouse pointer when it passes into the region covered by the control. More info.

 dbTable

 String

 Determines which database table a component belongs to.

 dbField

 String

 Determines which field of the database table this component belongs to.

 Enabled

 Boolean

 Controls whether the component responds to mouse, keyboard, and timer events.

 Hint

 String

 Hint contains the text string that appears when the user moves the mouse over the component., see also ShowHint

 isEmpty

 Boolean

 It returns True if the component has a picture loaded, otherwise it returns False.

 Name

 String

 The name of the component.

 OpenDialogFilter

 String

 This property allows you to set a file filter for the dialog box for selecting a picture. Example: Form1.dbImage.OpenDialogFilter := 'JPEG files (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP files (*.bmp)|*.bmp|All files|*.*';

 Picture

 TPicture

 Access to picture properties and methods.

 Proportional

 Boolean

 Indicates whether the image should be changed, without distortion, so that it fits the bounds of the image control.  The property makes sense if the Stretch=True property

 ShowHint

 Boolean

 Specifies whether to show the Help Hint when the mouse pointer moves over the component, see also Hint

 ShowButtonOpen

 Boolean

 Determines whether the "Open" button is displayed or not.

 ShowButtonSave

 Boolean

 Determines whether the "Save" button is displayed or not.

 ShowButtonDelete

 Boolean

 Determines whether the "Delete" button is displayed or not.

 Stretch

 Boolean

 Indicates whether the image should be changed so that it exactly fits the bounds of the image control. s

 Tag

 Integer

 Allows you to assign a number to a component for your own needs.

 TagString

 String

 Allows you to assign a string to a component for your own needs.

 Visible

 Boolean

 Specifies whether the component appears onscreen.

 Left

 Integer

 Specifies the horizontal coordinate of the left edge of a component relative to its parent.

 Top

 Integer

 Specifies the vertical coordinate of the upper-left of a component relative to its parent.

 Width

 Integer

 Specifies the horizontal size of the component in pixels.

 Height

 Integer

 Specifies the vertical size of the component in pixels.





Methods

 Method

 Description

 procedure Clear

 Clears the contents of the component.

 function CopyToClipboard: Boolean

 Copies the image to the clipboard.

 procedure LoadFromDatabase (TableName, FieldName: string; id: integer)

 Loads a picture from the database.





Events

 Event

 Description

 OnClick

 Occurs when the user clicks the component.

 OnDoubleClick

 Occurs when the user double-clicks the left mouse button when the mouse pointer is over the component.

 OnMouseDown

 Occurs when the user presses a mouse button with the mouse pointer over a component.

 OnMouseEnter

 Occurs when the user moves the mouse into a component.

 OnMouseLeave

 Occurs when the user moves the mouse outside of a component.

 OnMouseMove

 Occurs when the user moves the mouse pointer while the mouse pointer is over a component.

 OnMouseUp

 Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component.