A single visual item in the popup.
Usage
Set_Property(OLECtrlEntID, "OLE.Item[Index]", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Rectangle | Multivalue | The item's size and location | 0, 0, 0, 0 |
<2> | Caption/Image | Text | The item's caption or image | "" |
<3> | Colors | Multivalue | The item's text and background colors | None, None |
<4> | Font | Font | The item's font | Tahoma, 8 pt. |
<5> | Alignment | Multivalue | The item's vertical and horizontal alignment | Left, Top |
<6> | Hyperlink | Boolean | Specifies that the item is a hyperlink | False$ |
<7> | Button | Boolean | Specifies that the item is a button | False$ |
Indices
Index | Description |
---|---|
Index | Index to an existing item |
Remarks
The Item property allows you to read or modify existing item attributes. Simply pass the index of the item you wish to work with to access an @FM delimited array of item attributes. Each attributes is explained below in detail.
Rectangle
The rectangle attributes is composed of four sub-values: Left, Top, Right, and Bottom:
Pos | Name | Type | Description |
---|---|---|---|
<1, 1> | Left | Integer | The item's X position |
<1, 2> | Top | Integer | The item's Y position |
<1, 3> | Width | Integer | The item's width |
<1, 4> | Height | Integer | The item's height |
This is a required value since it defines the item's dimensions. Note also that the rectangle is relative to the top left corner of the popup. So, if X and Y are 0, then the item will start in the popup's top left corner.
Caption/Image
This attributes can be the item's caption or the item's text. Note that an item cannot have both. The item will first treat this value as an image path and attempt to load it. If the load fails, then the text becomes the caption instead. Note also that the items always word wraps the text.
Colors
This value establishes the item's colors and is composed of two sub-values:
Pos | Name | Type | Description |
---|---|---|---|
<3, 1> | Text Color | Color | The item's text color |
<3, 2> | Background | Color Fill | The item's background |
The Text Color can be any Color value. If None or Auto, then the text is black. The Background can be any valid Color Fill pattern. If it is set to None, then the item is transparent.
Font
This attribute defines the font used to display the item's caption. It is ignored if the item uses an image.
Alignment
The alignment value is composed of two sub-values:
Pos | Name | Type | Description |
---|---|---|---|
<5, 1> | Horizontal Alignment | Option | The caption's horizontal alignment |
<5, 2> | Vertical Alignment | Option | The caption's vertical alignment |
The Horizontal Alignment can be set to Left, Center, or Right, and the caption will be justified with the item's Rectangle accordingly. The Vertical Alignment can be set to Top, Center, or Bottom. Note that this also determines where the image is located within the item's bounds.
Hyperlink
This attribute is a simple flag. When set to 1, the item automatically underlines the caption when the user hovers over the item. Note that it does not change the item's color or font. Currently, there is no support for hyperlink colors.
Button
This value determines if the item should behave like a button. When set to 1, the item's background appears as a button when ther user hovers over it or clicks it.
Example
// Change item 1 to a hyperlink Item = "" Item<6> = True$ Set_Property(@Window:".OLE_POPUP", "OLE.Item[1]", Item)