Compatibility: 6.7.x and 6.8.x
This tech tip provides you with a method that will change the font style that is used by the text in a hierarchical list. Here is a "before and after" scenario of a Hierarchical List.
Before:
After:
You can change the display font style of the list item by executing the following method:
` Project Method: SetSelectedItemStyle
` Description: change the Font style for the selected list item
`
` $1 - Pointer to the target list
` $2 - Reference number of the selected list item (Number)
` $3 - Font style for the item (Number)
C_POINTER($1;$ListPtr)
$ListRef:=$1
C_LONGINT($2;$3;$RefItem;$style;$Position;$SubRef;$icon;$tempStyle)
$Position:=$2
$style:=$3
C_TEXT($itemText)
C_BOOLEAN($expand;$enterable)
GET LIST ITEM($ListRef->;$Position;$RefItem;$itemText;$SubRef;$expand)
GET LIST ITEM PROPERTIES($ListRef->;$RefItem;$enterable;$tempStyle;$icon)
SET LIST ITEM PROPERTIES($ListRef->;$RefItem;$enterable;$style;$icon)
REDRAW LIST($ListRef->)
The method SetSelectedItemStyle can be executed from either Menu Item or an Object.
Here is what the method call should look like.
SetSelectedItemStyle (->hList;Selected list item(hList);Bold ) ` Bold
SetSelectedItemStyle (->hList;Selected list item(hList);Plain ) ` Plain
SetSelectedItemStyle (->hList;Selected list item(hList);Underline ) ` Underline
SetSelectedItemStyle (->hList;Selected list item(hList);Italic ) ` Italic