Delphi common attributes:

Source: Internet
Author: User

Align sets the component alignment (same as its parent container) Mode
Borderstyle set widget border shape
Caption
Ctl3d sets whether the widget border is in 3D mode. If borderstyle is set to bsnone, this attribute is invalid.
Set the background color of the widget.
Cursor sets the shape of the mouse over the widget time mark
Enabled: sets whether the component can be used. When set to false, the component is dimmed.
Font sets the font, font size, and color of the text in the component.
Height: sets the component height.
Helpcontent is used to establish an association for the index value in the help description file
Left: Set the distance between the widget and the left border of the parent widget.
Popupmenu shortcut menu
Taborder sets the sequence in which the focus is moved after the tab key is pressed.
If tabstop is set to false, the focus does not stay on this component after the tab key is pressed.
Top: Set the distance between the widget and the upper border of the parent widget.
Visible: Specifies whether the component is visible. This attribute only takes effect during execution.
Width: Set the display width of the widget.
Delphi common events:
Onchange event triggered when the Component Changes
Onclick event triggered when the left mouse button is pressed on this component
Ondblclick event triggered when you double-click the left mouse button on this component
Onenter event triggered when focus enters this component
Onexit is an event triggered when you switch to another component to make the component lose focus, but when you switch to another form or application Program This event will not be triggered
Onkeydown events triggered when a key is pressed on a component with a focus. The keys include all English keys, number keys, direction keys, and function keys.
Onkeypress events triggered when a key is pressed on a component with a focus, but the keys only include all English letters, number keys, tab, backspace, enter, and ESC
Onkeyup event triggered when the user releases the buttons on the keyboard. Press the button to view the onkeydown event.
Onmousedown events triggered when the mouse key is pressed on a component (which of the following parameters is the mouse key pressed, whether a special key (CTRL, ALT, shift) is pressed, and the current coordinates of the mouse)
Onmousemove event triggered when the mouse moves inside the component
Onmouseup event triggered when the mouse key is opened above the component
The event that onpaint triggers when the component needs to be repainted. You can customize the painting method at this time.

Common attributes and events of form Components
Attribute description
Active indicates whether the form has the focus
Activecontrol indicates the current focus component in the form.
Activemdichild indicates the child form with focus in the main form.
Activeolecontrol is used to obtain or set the ole control on this form to respond to the focus change.
Bordericons specifies which icons are displayed on the title bar of the form.
Bordersytle is used to specify the appearance and behavior of the form border.
Canvas provides a canvas that you can display on the client on the form. It is generally used in the onpaint event.
Clienthandle provides access to the MDI client window handle used inside the system
Clientheight form client height
Rectangle corresponding to the client area of the clientrect form
Clientwidth form client area width
Defaultmonitor specifies the preset display displayed in this form. It is used in multiple display environments.
Designer: The design interface of this form.
Droptarget is used to specify whether the form is the target of the current drag and drop action.
Floating indicates whether the form is parked in another window
Formstate indicates the status of the form
Formstyle indicates the style of the form.
Helpfile is used to specify the Help File
Icon specifies the icon displayed when the form is minimized.
Keypreview: Specifies whether to obtain the keyboard input before the current active component.
Mdichildcount is used to obtain the number of subforms.
Mdichil is used to obtain a subform (array)
Menu is used to specify the main menu of the form.
Modalresult: when the form acts as the modal dialog box, it acts as the result of the dialog box.
Monitor is used to indicate the display displayed in the form.
Oldcreateorder specifies when the oncreate and ondestroy events will occur
Oleformobject specifies the oleform interface for OLE objects contained in this form
Parent sets the parent of this form
Parentbidimode specifies whether this form uses the bidimode of parent
Pixelsperinch indicates the font ratio of the system when the form is designed.
Position indicates the size and position of the form.
Printscale indicates the proportion of the printed form.
Scaled is used to specify whether the size of the form is specified based on the pixelsperintch attribute.
Tilemode is used to specify how child forms are arranged when the tile method is called
Visible is used to set whether the form is displayed.
Windowmenu if the form is an MDI parent form, it is used to specify the menu of the window
Windowstate is used to specify how the form is displayed on the screen.

Event Description
Onpaint occurs when the form must be repainted.
Onhelp occurs when the form receives the help request.
Ondragdrop occurs when an object is pulled into this form and dropped.
Ondragover occurs when an object is pulled into this form.
Onconstrainedresize occurs after the oncanresize event occurs
Oncanresize: determines whether to change the form size when attempting to change the form size
Onresize occurs when the form size changes
Onstartdock occurs when the object starts to be parked.
Onenddock occurs when the object stops parking
Onundock occurs when the form is deprecated
Ondockdrop occurs when other forms are docked to this component.
Ondockover occurs when other forms dock to this component.
Ongetsiteinfo occurs when a moat message is returned to this form.
Oncreate occurs when the form is created.
Onclose occurs when the form is about to be closed
Onclosequery determines whether the form is actually closed when the form is about to be closed
Ondestroy occurs when the form is released
Onshow occurs when the form is displayed.
Onhide occurs when the form is hidden.
Onactivate occurs when the form obtains focus.
Ondeactivate occurs when the form loses focus.

Common attributes of menu components (mainmenu and popupmenu)
Attribute description
Automerge is used to specify whether the main menu of the main form is merged with the main menu of other forms.
Handle main menu windowCode
Bidimode is used to specify whether the option name is left-to-right read or right-to-left read.
Images is used to specify the image content that can be displayed next to the option
Content of the items Option
Ownerdraw is used to specify whether or not to display the data on its own.
Parentbidimode is used to specify whether to inherit the bidimode attribute of the parent control.
Windowhandle uses the window code of this menu

Menu item attribute description
Action is used to specify the action corresponding to this option
Bitmap is used to specify the image content next to this option
Break is used to specify whether to create a new column from this option
Name displayed by the caption Option
Checked is used to specify whether this option is checked
Command is used to specify the Windows command ID corresponding to the option
Count indicates the number of sub-options for this option
Default indicates whether this option is a preset item of the Sub-menu.
Eanbled is used to indicate whether this option is available
Groupindex is used to specify the logical group to which this option belongs, to control the effect of merging between the main menus or mutex of Single-choice buttons
Handle corresponds to the Windows menu handle of the drop-down menu of this option
Helpcontext corresponds to the help context ID of this option
Hint is used to set the prompt information when the mouse is moved to the option range.
Imageindex is used to specify which image is displayed next to the option
Items number of sub-menu items for this option
Menuindex option index value in the parent menu of this option
Parent the parent menu option of this option
Radioitem is used to set whether this option is mutually exclusive with other options in the same group.
Shortcut cut is used to set the shortcut key for this option
Visible is used to set whether this option is visible.

Label attributes:
Attribute description
Alignment is used to set the alignment (horizontal) of the text in the label)
Autosize is used to set whether the label component automatically adjusts the size according to the text in the component.
Focuscontrol is used to set the components whose focus should be accepted after the shortcut key is entered in the tag.
Layout is used to set how label text is placed (vertical)
Showaccelchar is used to set whether to allow the text in the label to show the shortcut key value with an underline
Transparent is used to set whether the component is transparent.
Wordwrap is used to set whether to wrap automatically when the component text is wider than the component width.

Edit and maskedit attributes:
Attribute description
Autoselect is used to set whether to automatically select all texts after the component obtains the focus
Autosize is used to set whether to automatically extend the component length when the input text is added to the component.
Borderstyle is used to set the widget border style.
Canundo is used to set whether the text in the component can be undo
Charcase is used to set the case sensitivity of text in the component.
Hideselection is used to set whether the selected text is valid when the component loses focus.
Maxlength is used to set the maximum length of input text in the component.
Modified can be used to determine whether the text in the component has changed
Oemconvert determines whether to convert the text ASCII code in the editing box to an OEM, and then convert the text from an OEM to an ASCII
Passwordchar delimiter used to set Password Input
Readonly sets whether the content of the editing box can be modified.
Sellength indicates the length of the selected text in the editing box.
Selstart indicates the starting position of the selected text in the editing box.
Seltext indicates the selected text in the editing box

Editmask indicates the maskedit mask string

Common attributes of buttons (button, bitbtn, and speed button:
Common button attributes
Cancel sets whether this button is a Cancel button (the cancel button is an event that can be executed if you press ESC when the program is executed)
Default indicates whether to execute the click event after pressing enter.
Modalresult is usually used in the dialog box form. When you press this button, the value of this attribute is the modalresult of the modal form to which the button belongs.
Set or retrieve the title displayed on this button

Bitbtn attribute description (graphical button)
Glyph is used to set the image displayed on this button
Kind is used to specify the button type
Layout is used to set the position of the image displayed on the button.
Margin is used to set the distance between the button edge and the image edge (in pixels)
Numglyphs is used to set the number of button images
Spacion is used to set the distance between the image and the text (in pixels)
Style to set the button appearance

Speed button attribute description (quick button)
Allowallup is used to set whether the group containing this shortcut can maintain the up status at the same time.
Down is used to set whether the shortcut is selected
Flat is used to set whether the quick button displays 3D edges.
Groupindex: the group used to set the shortcut.
Transparent is used to set whether the shortcut is transparent

Note common attributes and events of components (Memo:
Attribute description
Lines is used to obtain the text in the component (array, so single line text can be obtained)
Text is used to obtain the text (string) in the component)
Readonly is used to set whether the component text can be modified.
Scrollbars is used to set the widget scroll bar mode.
Wantreturns is used to set whether the entered enter key is used as text content.
Wordwrap is used to set whether the text is automatically wrapped.
Selstart indicates the starting position of the selected text
Sellength indicates the length of the selected text
Wanttabs is used to set whether the input Tab key is used as text content.
Seltext indicates the selected text

Event Description
Memo. lines. Add () adds a line of text to the current line.
Memo. lines. append () append a line of text at the end
Memo. lines. Insert adds a line of text at the specified position
Memo. lines. delete specified Line Text
Memo. lines. loadfromfile imports text from the specified file to the component
Memo. lines. loadfromstream imports text from the specified stream to the component
Memo. lines. savetofile stores component text as a specified file
Memo. lines. savetostream stores component text as a specified stream
Memo. Clear clear all text of the component
Memo. cuttoclipboard cut the selected text to the clipboard
Memo. copytoclipboard copies the selected text to the clipboard
Memo. pastefromclipboard paste text from the clipboard to the current position

Common attributes of check boxes:
Attribute description
Alignment
Allowgrayed determines whether the check box has the grayed status.
Checked determines the check box status
State indicates the status of the check box

Radiobutton common attributes:
(Mutex options are provided. Therefore, they are usually used for group implementation and can be implemented using groupbox or radiogroup)
Attribute description
Alignment: Set the title of a ticket
Checked determines the single commit status

Group box (groupbox) common attributes: (used as a container)
Attribute description
The title of the caption group box, which is usually used to indicate the purpose of the component.

Radiogroup common attributes:
Attribute description
Caption indicates the name of a single-choice combination.
Columns indicates that the single-choice button is displayed in a single row or multiple behavior units.
Content of the title of the items radio button (in behavior units)
Itemindex indicates the index value of the currently selected radio button

Common Properties of ListBox:
Attribute description
Canvas provides a canvas for customizing the project content of the display list box for ondrawitem events.
Columns
Extendedselect: Specifies whether shift can be used for connection selection.
Itemheight: sets the height of the list box item.
Itemindex specifies the index value of the selected project
String content of the items Project
Set whether multiple selections are allowed by multiselect
Number of items selected in the selcount list box
Selected indicates whether a project is selected
Sorted specifies whether the items in the list box are sorted alphabetically
Style indicates the display mode of the list box.
Topindex indicates the index value of the item at the top of the list box.

ComboBox common attributes:
Attribute description
Canvas provides a canvas for customizing the display of the content of a combo box project for ondrawitem events.
Charcase: Specifies the case sensitivity of text and letters in the combo box.
Dropdowncount
Droppeddown is used to determine whether the combo is in the drop-down menu.
Itemindex indicates the index value of the currently selected item in the drop-down list.
Items drop-down menu item content
Maxlength sets the maximum number of characters that can be entered in the edit part of the combo box.
Sellength indicates the length of the selected text in the edit part of the combo box.
Seltext indicates the selected text in the edit part of the combo box.
Selstart indicates the starting position of the selected text in the edit part of the combo box.
Style indicates the display mode of the combo box.

Common attributes of a scroll bar:
Attribute description
Max indicates the maximum value of the scroll bar.
Min indicates the minimum value of the scroll bar.
Position indicates the current position of the slider.
Largechange indicates moving the value when you move the cursor between the scroll bar and the sliding block.
Smallchange indicates moving the value when you press the arrow at both ends of the scroll bar
Kind indicates the scroll bar type (horizontal or vertical)
Pagesize indicates the number of changes when Pageup or Pagedown is pressed.

Image common attributes:
Attribute description
Autosize: whether the component is adjusted to the same size as the read image
Incrementaldispaly: whether to display images gradually when reading larger image files
Picture points to an image file object, which can be a file name.
Whether stretch automatically adjusts the image to the default size of this component

Common attributes of the image list box (imagelist:
Attribute description
Bkcolor specifies the background color
Blendcolor foreground mixed color
Number of images in the count component
Drawingstyle indicates how the image is drawn by this component.
Height value of each image in the height component
Whether or not to add a mask image when creating an image using imagetype
Whether masked can be added
Width value of each image in the width component

Common attributes of toolbar components:
Attribute description
Autosize: determines whether the toolbar automatically adjusts the size to accommodate the band.
Number of buttons in the buttoncount Toolbar
Button height in the buttonheight Toolbar
Buttons uses index to indicate buttons in the toolbar
Button width in the buttonwidth Toolbar
Disabledimages: List of images displayed when the tool button is disabled
Flat whether to set the surfaced Effect
Hotimages image list displayed when you point to the toolbar button
Images provides a list of images displayed on the toolbar buttons.
Indent: Set the interval on the left side of the toolbar
List sets whether the title text is displayed on the right of the image
Rowcount specifies the number of rows in the toolbar.
Showcaptions set whether the tool button displays text
Warpable determines whether to automatically wrap a line when setting the toolbar arrangement button

Toolbutton attribute description
Allowallup: whether the tool buttons in the same group can be selected
Whether the down button can be stopped in the pressed status
Dropdownmenu the menu that appears when the tool button is pressed
Grouped set tool buttons for the same group
Index value of the image associated with imageindex in the image list box
Does indeterminate provide the third condition of the toolbar?
Marked: Specifies whether the button has a shadow.
Style set button style
Wrap sets whether the new tool button is a new column

Common attributes of coolbar:
Attribute description
Align sets coolbar alignment
Autosize: determines whether to automatically adjust the size of the cool bar to accommodate the band
Bandborderstyle: Set the border style of the band.
Bands show all the bands in the coolbar
Bitmap sets the background image of the band.
Fixedorder: determines whether the band sequence can be adjusted by yourself.
Fixedsize: determines whether to limit all the bands in the cool column with a single degree.
Images provides the image required by bands
Showtext: Set whether the band displays text.
Vertical sets the way the band is arranged (horizontal or vertical)

Does docksite allow parking?

Common attributes of the status bar component (statusbar:
Attribute description
Panels set the status bar component area
Simplepanel sets a single area of the status bar
Simpletext sets the text in a single area of the status bar

Alignment sets the regional text alignment
Text display in the Set Area
Width: Set the area width.

Common Properties and events of the progress bar:
Attribute description
Max sets the maximum position.
Min sets the position minimum value.
Orientation: Set the display direction of the component
Position: set the current position of the progress bar.
Smooth sets the progress pointer of the progress bar to smooth or interval.
Step: set the amount added when the stepit method is called.

Event Description
Step by (integer) progress bar added value (increment specified by parameter)
Stepit progress bar added value (increment specified by step attribute)

Common attributes of trackbar:
Attribute description
Frquency sets the interval value between the current control scales
Linesize: Set the movement volume when you press the direction key.
Max sets the maximum position.
Min sets the position minimum value.
Orientation sets the display direction of this component
Pagesize: Set the movement of Pageup or Pagedown
Position: set the current position of this component
Selend: sets the last position of the selected range.
Selstart: Set the start position of the selected range
Slidervisible: Set whether the slider in this component is displayed.
Tickmarks
Tickstyle

Common attributes of pagecontrol
Attribute description
Multiline sets whether to adjust the number of lines according to the number of labels of the component.
Activepage current component selected tag
Tabposition: set all the positions of the component tag.
Style: Set the label style of the component.

Caption: Set the label title
Pageindex indicates the position of the tag
Tabvisible: Set whether to display the specified tag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.