ListView control
A ListView displays list information to the user. Each item of the
ListView consists of text and pictures, which can be manipulated during
application runtime.
Properties
|
ListView property |
Datatype |
Description |
|---|---|---|
|
Integer |
Specifies the ASCII value of the accelerator key |
|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Boolean |
Specifies whether PowerBuilder arranges icons |
|
|
Long |
Specifies the numeric value of the background |
|
|
Boolean |
Specifies whether the control has a border. Values TRUE — Control has a border. FALSE |
|
|
BorderStyle (enumerated) |
Specifies the border style of the control. Values StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to |
|
|
Boolean |
Specifies whether the column titles in report view |
|
|
CheckBoxes |
Boolean |
Specifies whether the state images are replaced by
The state of an item’s check box can be Unchecked = 1 Checked = |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether the user can delete a ListView |
|
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the user can edit the labels in a |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Control can be FALSE — Control cannot be |
|
|
Boolean |
Specifies whether users can select multiple items TRUE — FALSE — Users cannot select multiple |
|
|
String |
Specifies the name of the typeface in which the |
|
|
Boolean |
Specifies whether the user cannot drag items to new |
|
|
FontCharSet (enumerated) |
Specifies the font character set used for the text |
|
|
FontFamily (enumerated) |
Specifies the font family (type style) used for the AnyFont! Decorative! Modern! Roman! Script! Swiss! |
|
|
FontPitch (enumerated) |
Specifies the font pitch used for the text in the Default! Fixed! Variable! |
|
|
FullRowSelect |
Boolean |
Specifies whether an entire row can be selected in
|
|
GridLines |
Boolean |
Specifies whether the report view displays
|
|
HeaderDragDrop |
Boolean |
Specifies whether column headers can be dragged to
|
|
Integer |
Specifies the height of the control, in |
|
|
Boolean |
Specifies whether selected text stays selected TRUE — Text does not stay FALSE — Text stays |
|
|
ImeMode |
Integer |
Specifies the input method editor mode. This |
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not italic. |
|
|
String |
Specifies the items in the control. Not updated |
|
|
Integer |
Identifies the picture associated with the item. |
|
|
Boolean |
Specifies whether long labels wrap under the TRUE FALSE — Labels do not LabelWrap does not apply to list, report, or |
|
|
Integer |
Specifies the size, in pixels, for the height of In a If the |
|
|
Long |
Specifies the color to be transparent when used in |
|
|
String |
Specifies the name of the picture used in large |
|
|
Integer |
Specifies the size, in pixels, for the width of the In a script, If the large |
|
|
Boolean |
Specifies that the layout of the control should be TRUE — Elements in the control are right FALSE — Elements in the control are left |
|
|
OneClickActivate |
Boolean |
Specifies whether one click initiates the
However, the ItemActivate event is always |
|
String |
Specifies the name of the stock pointer or the file |
|
|
Boolean |
Specifies that characters should be displayed in TRUE — Characters display in right-to-left FALSE — Characters display in left-to-right |
|
|
Boolean |
Specifies whether the user can scroll vertically TRUE — Scrolling is enabled. FALSE |
|
|
Boolean |
Specifies whether column titles appear in a report TRUE — Titles appear in a report FALSE — Titles do not appear in a report |
|
|
Integer |
Specifies the size, in pixels, for the height of In a If the |
|
|
Long |
Specifies the color to be transparent when used in |
|
|
String |
Specifies the name of the picture used in small |
|
|
Integer |
Specifies the size, in pixels, for the width of the In a script, If the small |
|
|
grSortType |
Specifies whether items are sorted alphabetically Ascending! Descending! UserDefinedSort! Unsorted! |
|
|
Integer |
Specifies the size, in pixels, for the height of In a script, this value can be If the state picture height is |
|
|
Long |
Specifies the color to be transparent when used in |
|
|
String |
Specifies the name of the picture used as the state |
|
|
Integer |
Specifies the size, in pixels, for the width of the In a script, this value can be set If the state picture width is 0, |
|
|
Integer |
Specifies the tab value of the control within the |
|
|
String |
Specifies the tag value assigned to the |
|
|
Long |
Specifies the numeric value of the color used for |
|
|
Integer |
Specifies the size of the text in the control, in For backward compatibility, the size is |
|
|
TrackSelect |
Boolean |
Specifies whether items appear in a different color TRUE — An item changes color when the mouse FALSE — An item does not change color nor is it |
|
TwoClickActivate |
Boolean |
Specifies whether two clicks initiate the TRUE — Clicking twice (one FALSE — The However, the ItemActivate |
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not |
|
|
UnderlineCold |
Boolean |
When the OneClickActivate property is true, this TRUE — Hot tracking is FALSE — Nonhighlighted items are not |
|
UnderlineHot |
Boolean |
When either the OneClickActivate or TRUE — Hot tracking is turned on and FALSE — |
|
ListViewView |
Specifies the layout of the ListBox. Valid values ListViewLargeIcon! — Items are arranged from ListViewSmallIcon! — Items are arranged ListViewList! — Items are arranged from ListViewReport! |
|
|
Boolean |
Specifies whether the control is visible. Values TRUE — Control is visible. FALSE |
|
|
Integer |
Specifies the stroke weight of the text in the |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
ListView event |
Occurs |
|---|---|
|
When the user begins a drag operation with the left |
|
|
When the user starts to edit a ListView item label. |
|
|
When the user begins a drag operation with the |
|
|
When the control is clicked. |
|
|
When the column is clicked |
|
|
When the object is created, immediately before the |
|
|
When all items in a ListView are |
|
|
When a ListView item is deleted. |
|
|
When the object is destroyed, immediately after the |
|
|
When the control is double-clicked. |
|
|
When a dragged control is dropped on the ListView |
|
|
When a dragged control enters the control, |
|
|
When a dragged control leaves the control, |
|
|
When a dragged control is within the control but |
|
|
When the user finishes editing a ListView item |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
When an item is being inserted. |
|
|
When an item is double-clicked, or when the item is |
|
|
When an item has changed. |
|
|
When an item is changing. Return 1 to prevent the |
|
|
When the user presses a key. |
|
|
When the control loses focus (becomes |
|
|
When a Windows message occurs that is not a |
|
|
When the control is right-clicked. |
|
|
When the control is |
|
|
When two items are compared. Return 1 — if item 1 > item 2. 0 — -1 — if item 1 < item |
Functions
|
ListView function |
Datatype returned |
Description |
|---|---|---|
|
Integer |
Adds a column to a ListView control report |
|
|
Integer |
Adds an item to a ListView control. |
|
|
Integer |
Adds an icon, cursor, or bitmap to the large image |
|
|
Integer |
Adds an icon, cursor, or bitmap to the small image |
|
|
Integer |
Adds an icon, cursor, or bitmap to the state image |
|
|
Integer |
Arranges the items in a ListView control large or |
|
|
String |
Returns the name of the control. |
|
|
Integer |
Deletes a column from a ListView |
|
|
Integer |
Deletes all columns from a ListView |
|
|
Integer |
Deletes an item from a ListView |
|
|
Integer |
Deletes all items from a ListView |
|
|
Integer |
Deletes a specified icon, cursor, or bitmap from |
|
|
Integer |
Deletes all icons, cursors, and bitmaps from the |
|
|
Integer |
Deletes a specified icon, cursor, or bitmap from |
|
|
Integer |
Deletes all icons, cursors, and bitmaps from the |
|
|
Integer |
Deletes a specified icon, cursor, or bitmap from |
|
|
Integer |
Deletes all icons, cursors, and bitmaps from the |
|
|
Integer |
Starts or ends the dragging of a ListView |
|
|
Integer |
Starts editing a specific ListView item |
|
|
Integer |
Searches for the next item that satisfies the |
|
|
Integer |
Syntax 1: Does not apply to a ListView Syntax 2: Returns the properties of a |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
Integer |
Retrieves information for a specified |
|
|
Integer |
Finds the X and Y coordinates of the upper-left |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Hides the specified ListView item. |
|
|
Integer |
Inserts a column into a ListView control report |
|
|
Integer |
Inserts an item into a ListView |
|
|
Integer |
Moves a control or object to a specified |
|
|
Integer |
Determines the distance from the left edge of an |
|
|
Integer |
Determines the distance from the top edge of an |
|
|
Boolean |
Adds the event to the end of the event queue of an |
|
|
Integer |
Includes this object in a print job. Only the part |
|
|
Integer |
Resizes a control to the specified |
|
|
Integer |
Returns the number of the selected item in a |
|
|
Integer |
Syntax 1: Does not apply to a ListView Syntax 2: Sets the properties of a |
|
|
Integer |
Sets focus for a specified object or |
|
|
Integer |
Sets the values for a given ListView |
|
|
Integer |
Maps a picture index to an overlay picture index. |
|
|
Integer |
Sets the position of the ListView control in the |
|
|
Integer |
Controls the automatic redraw of an object after |
|
|
Integer |
Makes an object or control visible if it is hidden. |
|
|
Integer |
Sorts the items in a ListView |
|
|
Integer |
Returns the number of columns in a ListView control |
|
|
Integer |
Returns the number of items in a ListView |
|
|
Integer |
Returns the number of selected items in a ListView |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Object |
Returns the type of the control. |