Description


The component is used to save the file to the database and retrieve it from the database.



Class: TdbFileToDatabase



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.

 dbFileIsChanged

 Boolean

 If the property returns True, then the file in the component has been changed.

 dbInitialDir

 String

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

 Alignment

 TAlignment

 Sets the text alignment. Available values: taCenter, taRightJustify, taLeftJustify

 AutoSelect

 Boolean

 Determines whether all the text in the edit control is automatically selected when the control gets focus.

 BorderStyle

 TBorderStyle

 Determines whether the edit control has a single line border around the client area. Available values: bsSingle, bsNone

 CanFocus

 Boolean

  It checks if the component can get input focus, which is usually necessary before using the SetFocus method. If a component has Visible = False or Enabled = False property, or if the component is located on a parent component with those properties, using the SetFocus method will cause an error.


example: if Form1.DBFile1.CanFocus then Form1.DBFile1.SetFocus;

 CharCase

 TEditCharCase

 Determines the case of the text within the edit control. Available values: ecNormal, ecUpperCase, ecLowerCase

 Color

 TColor

 Specifies the background color of the control. More info.

 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.

 Focused

 Boolean

 Determines whether the control has input focus.

 Font

 TFont

 Allows you to set font name, size, color and style. More info.

 GetTextLen

 Integer

  Returns the length of the component's text.

 Hint

 String

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

 LeftButton

 TEditButton

 To access the left button properties (Enabled, Hint, Visible).

 MaxLength

 Integer

 Specifies the maximum number of characters the user can enter into the edit component.

 Name

 String

 The name of the component.

 PopupMenu

 TPopupMenu

 Provides access to the component's popup menu from the right button.

 ReadOnly

 Boolean

 Determines whether the user can change the text of the edit component.

 RightButton

 TEditButton

 To access the properties of the right button (Enabled, Hint, Visible).

 ShowHint

 Boolean

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

 TabOrder

 Integer

 Indicates the position of the component in its parent's tab order. TabOrder is the order in which child components are visited when the user presses the Tab key.

 TabStop

 Boolean

 Determines whether the user can tab to a control. Use the TabStop to allow or disallow access to the control using the Tab key.

 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.

 Text

 String

 Contains a text string associated with the component.

 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

 Deletes all text from the edit component.

 procedure ClearEx

 Clears the data and text content of the component.

 procedure CopyToClipboard

 Copies the selected text in the edit component to the Clipboard.

 procedure CutToClipboard

 Copies the selected text to the Clipboard and then deletes the selection.

 procedure PasteFromClipboard

 Pastes the contents of the Clipboard into edit component, replacing the current selection.

 procedure SelectAll

 Selects all text in the edit component.

 procedure SetFocus

 Gives the input focus to the component.




Events

 Event

 Description

 OnChange

 Occurs when you change the text in a component.

 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.

 OnEnter

 Occurs when a component receives the input focus.

 OnExit

 Occurs when the input focus shifts away from one component to another.

 OnKeyDown

 Occurs when a user presses any key while the form has focus.

 OnKeyPress

 Occurs when a key is pressed. Note that this procedure handles printable characters only.

 OnKeyUp

 Occurs when the user releases a key that was pressed.

 OnLeftButtonClick

 Occurs when the left button is pressed.

 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.

 OnRightButtonClick

 Occurs when the right button is pressed.

 OnDropFiles

 Occurs when user tries to drag and drop a file from explorer to a form. More info.